Problems with Boost::Python Embedding Tutorials
Hello, I am unable to get the boost:python embedding tutorials to work. I have the exact same problems as in this unanswered post: http://www.nabble.com/boost.python-embedding-tutorial-doesn%27t-work---td176... Basically, commands like this python::object ignore = python::exec("print len([1,2,3])", main_namespace); fail with Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: 'NoneType' object is unsubscriptable whereas simpler commands like this do work: python::object ignoreme = python::exec(python::str("print 5"), main_namespace); Similar problems occur with eval instead of exec, for some uses the error is instead TypeError: 'NoneType' object does not support item assignment If it's important, I am running Ubuntu 8.04, Python is 2.5.2, Boost is 1.34.1. Thanks in advance for any tips. - Kripken
on Sun Aug 03 2008, Kripken
Hello,
I am unable to get the boost:python embedding tutorials to work. I have the exact same problems as in this unanswered post:
http://www.nabble.com/boost.python-embedding-tutorial-doesn%27t-work---td176...
Basically, commands like this
python::object ignore = python::exec("print len([1,2,3])", main_namespace);
fail with
Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: 'NoneType' object is unsubscriptable
whereas simpler commands like this do work:
python::object ignoreme = python::exec(python::str("print 5"), main_namespace);
Similar problems occur with eval instead of exec, for some uses the error is instead
TypeError: 'NoneType' object does not support item assignment
If it's important, I am running Ubuntu 8.04, Python is 2.5.2, Boost is 1.34.1.
Thanks in advance for any tips.
Kripken, Could you please submit a ticket describing the problem at http://svn.boost.org? Thanks, -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (2)
-
David Abrahams
-
Kripken