PyThreadState_Get error with C extension module 
Author Message
 PyThreadState_Get error with C extension module

Hi all,

I still have a problem getting python 1.6 alpha 2 to run on Windows NT,
in particular my own C extension modules. I have compiled the
python16.dll and the
python.exe by using the supplied Visual C++ project file from the
PCbuild directory
and all succeeds without a complaint. I also managed to compile my
extension module
which accesses a library of C functions implementing a Petri net
simulator engine.
But when I try to import my module, I receive the error message  "Fatal
Python error:
PyThreadState_Get: no current thread" and the interpreter crashes.
What's wrong ? Note that my module has been working for years under
Python 1.5.x and
doesn't use any threading. Its interface complies with the standard
interface given in the
example_nt directory. Under Linux it worked fine without changing a line
of code when
switching from Python 1.5  to 1.6.
Any hints ?

Thomas
______________________________________________________________________
Thomas Freytag                         Phone:         +49 721 608 4301
University of Karlsruhe - SZS          Fax:             +49 721 697377

WWW homepage:                   http://www.*-*-*.com/
PGP private key:     http://www.*-*-*.com/
______________________________________________________________________



Sun, 08 Dec 2002 03:00:00 GMT  
 PyThreadState_Get error with C extension module
Its probably that one of your modules is still linking against Python 1.5,
causing _both_ Python15.dll and Python16.dll to be loaded - but only one
is initialized correctly, and the other immediately causes this
thread-state error.

Mark.

--

{*filter*}!

Quote:
> Hi all,

> I still have a problem getting Python 1.6 alpha 2 to run on Windows NT,
> in particular my own C extension modules. I have compiled the
> python16.dll and the
> python.exe by using the supplied Visual C++ project file from the
> PCbuild directory
> and all succeeds without a complaint. I also managed to compile my
> extension module
> which accesses a library of C functions implementing a Petri net
> simulator engine.
> But when I try to import my module, I receive the error message  "Fatal
> Python error:
> PyThreadState_Get: no current thread" and the interpreter crashes.
> What's wrong ? Note that my module has been working for years under
> Python 1.5.x and
> doesn't use any threading. Its interface complies with the standard
> interface given in the
> example_nt directory. Under Linux it worked fine without changing a line
> of code when
> switching from Python 1.5  to 1.6.
> Any hints ?

> Thomas
> ______________________________________________________________________
> Thomas Freytag                         Phone:         +49 721 608 4301
> University of Karlsruhe - SZS          Fax:             +49 721 697377

> WWW homepage:                   http://www.*-*-*.com/
> PGP private key:     http://www.*-*-*.com/
> ______________________________________________________________________



Sun, 08 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Fatal Python error: PyThreadState_Get: no current thread with extension module

2. Fatal Python error: PyThreadState_Get

3. PyThreadState_Get error again :(

4. Fatal Python error: PyThreadState_Get: no current thread

5. Fatal Python error: PyThreadState_Get: no current thread

6. Fatal Python error: PyThreadState_Get: no current thread

7. Fatal Python Error: PyThreadState_Get: no current thread

8. Fatal Python error: PyThreadState_Get: no current thread

9. Extension module import error with MinGW, SWIG, and distutils

10. Runtime error importing extension modules

11. CS Refactoring Browser Extensions

12. to CS: or not to CS: in F-PC assembler

 

 
Powered by phpBB® Forum Software