Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Fatal Python error with Py_InitModule (Python 2.3)

Reply
Thread Tools

Fatal Python error with Py_InitModule (Python 2.3)

 
 
Andrew Ellem
Guest
Posts: n/a
 
      08-25-2003
I'm using Python embedded in my app, and I've run into problems creating my
own
modules. I'm using Python version 2.3 compiled with MSVC .NET (not 2003).

When I call Py_InitModule I get the message:
"Fatal Python error: Interpreter not initialized (version mismatch?)"

However, Python does seem to be initialized. Py_IsInitialized() returns 1,
and I
can PyImport_Import() and I can run scripts successfully from my program.

I'm not sure what I could be doing wrong, all the information I've found
online
indicates that the above message comes from incompatible version (not using
a
debug version, etc), but I don't see how that would be the problem in my
case,
since I can run normal scripts.

Does anyone have an idea what might be the problem?

Thanks.

__________________________________________________ _______________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy...n.asp?cid=3963


 
Reply With Quote
 
 
 
 
John Paquin
Guest
Posts: n/a
 
      08-27-2003
this problem is almost certainly because the headers you compiled with
do not match the dll that's getting loaded. My advice to you is to
download the source tar, unzip it, build it (from dist\pcbuild) and use
that dll and those header files. Then you'll know that everything matches.

Andrew Ellem wrote:
> I'm using Python embedded in my app, and I've run into problems creating
> my own
> modules. I'm using Python version 2.3 compiled with MSVC .NET (not 2003).
>
> When I call Py_InitModule I get the message:
> "Fatal Python error: Interpreter not initialized (version mismatch?)"
>
> However, Python does seem to be initialized. Py_IsInitialized() returns
> 1, and I
> can PyImport_Import() and I can run scripts successfully from my program.
>
> I'm not sure what I could be doing wrong, all the information I've found
> online
> indicates that the above message comes from incompatible version (not
> using a
> debug version, etc), but I don't see how that would be the problem in my
> case,
> since I can run normal scripts.
>
> Does anyone have an idea what might be the problem?
>
> Thanks.
>
> __________________________________________________ _______________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy...n.asp?cid=3963
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2.x,3.x iOS static build: Fatal Python error: exceptionsbootstrapping error. angeljanai@gmail.com Python 1 05-22-2012 05:20 AM
error C3861: 'Py_InitModule' duprez@hinet.net.au Python 1 01-31-2009 06:10 AM
Bug in python [was: Fatal Python error: ceval: tstate mix-up] Laszlo Nagy Python 0 01-12-2009 08:51 AM
Fatal Python error using ctypes & python exceptions mmacrobert Python 1 08-31-2007 03:55 PM
BCB5 & Py_InitModule in python 2.3.5 crashes sometimes anton Python 0 06-02-2005 07:00 AM



Advertisments