473,225 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

Help: Runtime Error when loading ".pyd" module

Hi There,

We are extending Python interpreter to support special functions of our
tools. What we did is to compile Python's source code (which is got from the
an installation on a Linux environment for Python 2.3.3) and our extensions
(C++ code) on Windows with Microsoft Visual C++ 6.0 compiler to generate the
extended Python interpreter.

It works well on Linux and for the basic Python modules and our special
modules on Windows. But whenever a ".pyd" module is loaded by a statement
like the following:
import socket; # which finally calls: import _socket
import Tkinter; # which finally calls: import _tkinter
import datetime
it hits a "Runtime Error" (which is shown in a message box saying "abnormal
program termination") and a message like the following is printed in the
Fatal Python error: Interpreter not initialized (version mismatch?)
I tried to use Microsoft Visual Studio to debug the program and set a
breakpoint at "Py_FatalError()", but the breakpoint is not hit. I also
traced the loading process of the ".pyd" file in function
"_PyImport_LoadDynamicModule()": the ".pyd" file is correctly located and
loaded, and its "init" function seems be got correctly, but when the
initialization function is called, the above error happens.

I am pretty sure that Python is initialized by "Py_Initialize()", and the
".pyd" files are from the standard Python installation with the same version

Does anyone have any idea about the crash? Does the initialization function
from a ".pyd" file require special environment?

Because the ".pyd" files (like "_socket.pyd", _tkinter.pyd" and
"datetime.pyd" etc) are precompiled and contained in the Python installer
for Windows, I don't know how to manually compile them and debug them.

I appreciate your help in advance.

Mar 2 '06 #1
0 1788

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: python-help-bounces | last post by:
Your message for python-help@python.org, the Python programming language assistance line, has been received and is being delivered. This automated response is sent to those of you new to...
by: Nick | last post by:
How to change the pic to a "show error" image when loading images failed - for example, no image file exists? I tried to add the following statement in the onload event function: if...
by: Neal | last post by:
Hi I am trying to use a 3rd party DLL in my app, (WebService and/or WebApp) I set the references to it, use its public functions and properties OK in Dev mode but when I run it, i get the...
by: AA Arens | last post by:
To have the first character of a fiels capitalized AfterUppdate, I used the following script: Me!City = UCase$(Left$(Me!City, 1)) + Mid$(Me!City, 2) UCase (Left(Me!City, 1)) + Mid(Me!City, 2) ...
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12,...
by: John | last post by:
Hi Everyone, I'm having this extremely annoying problem with Internet Explorer 6, giving me an error message saying "unknown runtime error" whenever I try to alter the contents of a <divelement...
by: RMWChaos | last post by:
WinVista/IE7 I am getting some weird errors only in IE7, but not in FF2.0.0.8 or NN9. It even happens on this website when I click "Sign In". The error is: "A Runtime Error has occurred."...
by: John [H2O] | last post by:
Hello, I have a module created from a Fortran file to read in unformatted binary fortran output. It works fine for some datasets, but crashes with others. The strange thing is it will loop...
by: John [H2O] | last post by:
There's a lot of greek for me here ... should I post to numpy-discussions as well??? The backtrace is at the bottom.... Thanks! GNU gdb Fedora (6.8-21.fc9) Copyright (C) 2008 Free...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.