[capi-sig] PyImport_GetModuleDict: no module dictionary!"

Shaun Savage savages at mozapps.org
Thu May 6 10:09:42 CEST 2010

I am getting a SIGABRT
PyImport_GetModuleDict: no module dictionary!"

this is the code.

I need a InterpreterState because I need to create new threads using 
pthread and clone the existing state.

Does  PyInterpreterState_New, create a fulling initalized IS?
Does PyThreadState_New clone the existing state or a clean new one?

     is = PyInterpreterState_New();
     if ( is == NULL ) {
         fclose ( maa->pFILE);
         free( maa );
         return -2;
     maa->is = is;
     ts = PyThreadState_New(is);
     PyThreadState_Swap( ts );
     ts = PyThreadState_Get();
     maa->ts = ts;
     PyImport_ImportModule( "sys" );

More information about the capi-sig mailing list