Boost logo

Boost Users :

Subject: [Boost-users] [boost-users][python]
From: Germán Diago (germandiago_at_[hidden])
Date: 2009-03-18 11:09:55


Hello. I have a library which exposes the following function:

namespace ftr {

   Player & getPlayer(int num);

}

and it's exposed to python by:

def("getPlayer", &ftr::getPlayer,
                        return_value_policy<reference_existing_object>());

This code used to work, but now I compile it and get this error when
using it from the python module, under ubuntu 9.04:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line
77, in apport_excepthook
    pr['PythonArgs'] = '%r' % sys.argv
AttributeError: 'module' object has no attribute 'argv'

Original exception was:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
    ftr.getPlayer(int)
did not match C++ signature:
    getPlayer(int)

Any help here, please? I don't know why this should happen.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net