[C++-sig] strange error
Stefan Seefeld
stefan.seefeld at orthosoft.ca
Wed Oct 16 17:20:14 CEST 2002
hi there,
here is a (python) error I'v run across a couple of times
without understanding what it represents / comes from:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: __repr__ returned non-string (type str)
It looks as if I called (implicitely at least) a string
conversion function but the __repr__ function didn't return
what it is supposed to: a string.
The most puzzling is now that I have defined a wrapper
for a C++ method 'void Foo::bar(...)', and this
error is printed when a call to 'foo' returns.
The internals of Foo::bar are not seen by python, and the
return value is void, where does a string conversion attempt
come into play here ?
Thanks,
Stefan
PS: I even tried
r = foo.bar()
print type(r)
and then the 'print type(r)' would raise the above error...
More information about the Cplusplus-sig
mailing list