[C++-sig] Exception 'No to_python (by-value) converter found - 'garbage collection'

David Abrahams dave at boost-consulting.com
Tue Sep 19 16:26:07 CEST 2006


"Eduardo Picado" <eduardo.picado at gmail.com> writes:

>> > Running it I get:
>> >
>> >
>> >
>> > ok
>> > Exception exceptions.TypeError: 'No to_python (by-value) converter
>> > found for C++ type:
>> > class TASRSystem' in 'garbage collection' ignored
>> > Fatal Python error: unexpected exception during garbage collection
>>
>> This surely means you've wrapped a C++ function that returns a
>> TASRSystem and that function is getting invoked from some Python
>> class' __del__ method.
>>
>
> I suppose the __del__ method is gets invoked only by the garbage collector.
>
> It's strange but I've got the reported error only when running my python script.
> When typing in the comment line I get only:
> exceptions.TypeError: 'No to_python (by-value) converter found for C++ type:
> class TASRSystem
>
> I think I have solved the problem by removing the "boost::noncopyable"
> and commenting a private constructor in the header, to be able to
> compile the module.

I don't understand; the original problem was a runtime error.  That
implies you were already able to compile.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list