[C++-sig] About PyImport_Import

Paul Vicenti pvicenti at gmail.com
Tue Aug 7 21:01:28 CEST 2007


Hello,

I have a code that uses PyImport_Import. When the import module (in
this example 'testa') doesn't exist it returns a NULL but when I call
Py_Finalize it shows a exception:

Exception exceptions.ImportError: 'No module named testa' in 'garbage
collection' ignored
Fatal Python error: unexpected exception during garbage collection


Anybody knows how to prevent this error in Py_Finalize?

Thanks on advance,
Paul



More information about the Cplusplus-sig mailing list