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

Eduardo Picado eduardo.picado at gmail.com
Tue Sep 19 17:00:04 CEST 2006


On 9/19/06, David Abrahams <dave at boost-consulting.com> wrote:
> "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.

Exactly, it was compiling but giving a runtime error (No to_python
(by-value) converter found for C++ type: class TASRSystem).

To workaround this, I removed "boost::noncopyable", to force BP to
create a converter.
With this modification it didn't compile. So I commented a private
constructor (that I suppose is unused) in the header.



>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>


-- 
Eduardo PICADO
MSN eduardo.picado at gmail.com
portable +33 6 32 47 10 10 (NEW)
fix +33 1 45 03 52 54
|̲̅<̲̅Θ̲̅>̲̅|


More information about the Cplusplus-sig mailing list