0

When I Debug my Python C extension using Visual Studio the program abort with the message: "PyThreadState_Get: no current thread".

In Release the program works fine and if I add debugging information it still works fine.

How to solve the problem?

Vivian De Smedt
  • 1,019
  • 2
  • 16
  • 26

1 Answers1

0

If NDEBUG is defined you have to use the Debug version of the interpreter python_d.exe.

Furthermore if the name of the extension is myextension the name of the Dll in Release must be myextension.pyd but in Debug the name of the Dll must be myextension_d.pyd

Vivian De Smedt
  • 1,019
  • 2
  • 16
  • 26