[C++-sig] why am I getting a Boost.Python.ArgumentError?
Tom Haynes
trhaynes at gmail.com
Tue Aug 25 16:42:15 CEST 2009
Fixed it.
The self.geometry came from a list of Geometrys, which in C++ was a
std::vector. I had used the vector_indexing_suite to wrap this list,
but forgot to include the "true" as the NoProxy template parameter
(since they're boost::shared_ptrs).
-tom
On Mon, Aug 24, 2009 at 5:27 PM, Tom Haynes<trhaynes at gmail.com> wrote:
> When trying to called a wrapped method (getName) from python, I get
> the following error:
>
> return self.geometry.getName()
> Boost.Python.ArgumentError: Python argument types in
> Geometry.getName(Geometry)
> did not match C++ signature:
> getName(gfx::Geometry {lvalue})
>
> I don't understand why these don't match, though. It seems to say
> that the C++ signature is Geometry::getName() (which is true) ... and
> that's how I'm calling it from python. If I "print self.geometry" I
> get that it is a gfx.Geometry object.
>
> Thanks for your help.
>
> -tom
>
More information about the Cplusplus-sig
mailing list