[C++-sig] boost.python fails to recognize type
Gennadiy Rozental
rogeeff at gmail.com
Sun Jul 27 20:45:32 CEST 2008
Mateusz Berezecki <mateuszb <at> gmail.com> writes:
> TableScanner create_scanner(object pyspec)
> {
> Hypertable::ScanSpec& spec = extract<Hypertable::ScanSpec&>(pyspec);
> return TableScanner(m_table_ptr->create_scanner(spec, 10));
> }
> };
>
> The error is as follows
> TypeError: No registered converter was able to extract a C++ reference
> to type Hypertable::ScanSpec from this Python object of type
> Boost.Python.class
Obviuosly you are getting object representing class instead of one representing
instance of a class. you did not show how create_scanner is exported/invoked.
Maybe you exported it as static method?
Gennadiy
More information about the Cplusplus-sig
mailing list