[C++-sig] error accessing attribute
Stefan Seefeld
seefeld at sympatico.ca
Tue Dec 30 22:06:56 CET 2003
Hi Jonathan,
Jonathan Brandmeyer wrote:
> If you make a build of your project against the current CVS for
> Boost.Python you will get much better error messages. Otherwise, the
unfortunately I can't, as we are closing up on a release soon, so I have
to rely on released packages only.
> most common source of that error when accessing a property (for me,
> anyway) is that you are calling the property's accessor with the wrong
> signature, including passing an argument from Python that cannot be
> converted to the required C++ type.
hmm, from python I simply called 'obj.value'. As it is
boost::python::make_getter or somesuch that generates the accessor for
me, I must assume that the error is burried somewhere in there, i.e.
the wrong code is generated.
By the way, I just wrote a wrapper *function* that returns the object's
member, and that did work as expected. What didn't was 'make_function'
called with a method, and 'make_getter' called directly on the (public)
member.
Anyways, thanks for the help !
Stefan
More information about the Cplusplus-sig
mailing list