List Info

Thread: Fix for TypeError: __init__() should return None, not 'NoneType'




Fix for TypeError: __init__() should return None, not 'NoneType'
country flaguser name
France
2007-11-01 05:38:11

Hi all,


Just for the record:
While browsing sig-c++ archive I found the question about
getting the  
message:

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:

cd ~/lib
ln -s
/Library/Frameworks/Python.framework/Versions/2.5/Python  
libpython2.5.dylib

and link against python2.5, not python (which is indeed
python2.3).


Hope this helps.


Nicolas

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )