[C++-sig] Fix for TypeError: __init__() should return None, not 'NoneType'
Nicolas P. Rougier
Nicolas.Rougier at loria.fr
Thu Nov 1 11:38:11 CET 2007
Just for the record:
While browsing sig-c++ archive I found the question about getting the
Error: TypeError: __init__() should return None, not 'NoneType'
I got the same error message on MacOS.
The reason was that I installed framework python 2.5, build boost for
this version but linked my program against python2.3 (got no warning
from the compiler) because the version I installed did not provide
the libpython2.5.dylib link to the library.
A simple fix is to actually make the link:
ln -s /Library/Frameworks/Python.framework/Versions/2.5/Python
and link against python2.5, not python (which is indeed python2.3).
Hope this helps.
More information about the Cplusplus-sig