[Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

Patrick Rutkowski patrick.rutkowski at gmail.com
Mon Aug 7 21:21:41 EDT 2017


On Mon, Aug 7, 2017 at 8:44 PM, Larry Hastings <larry at hastings.org> wrote:
>
> My one idea: the GIL isn't initialized until you create a new thread.
>

That didn't seem to be it. I put a CreateThread() call right after
Py_Initialize(), and that didn't fix it. I also moved it around to
before Py_Initialize() and various other places, and nothing helped.


More information about the Python-Dev mailing list