[C++-sig] Re: multiple registrations of to-Python converter warning

David Abrahams dave at boost-consulting.com
Wed Apr 21 13:44:03 CEST 2004


Lutz Paelike <lutz_p at gmx.net> writes:

> Hi,
>
> I use Boost.Python to embed Python into another program.
> I wrapped some C++ classes to be able to share data.
>
>  From time to time i get the following warning:
>
> sys:1: RuntimeWarning: to-Python converter for class MySpecialClass already registered; second conversion method ignored.
>
> MySpecialClass is my wrapped class in this case.
> Obviously something is called twice but i have no clue what.
> A first guess was the initModulename() but i'm pretty sure that's not the case.
>
> The program works without problems, but i would like to know how/when this warning occurs.
> Any hints into the right direction would be fine.

Try recompiling the boost python library with
-DBOOST_PYTHON_TRACE_REGISTRY; you should get some diagnostic
feedback when you run your application that helps.

To do that with bjam,

   bjam -a "-sBUILD=<define>BOOST_PYTHON_TRACE_REGISTRY" 

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com





More information about the Cplusplus-sig mailing list