[C++-sig] Re: debuging

Mike Rovner mike at bindkey.com
Tue Nov 19 23:13:21 CET 2002


"Bjorn Pettersen" <BPettersen at NAREX.com> wrote in message

> I just got 'TypeError: bad argument type for built-in
> operation' and have absolutely no idea what to do next.

Sounds like you need to get the traceback... Here's how I do it (you'll
probably want to modify it to throw a more standard exception ;-)

-- bjorn

Thank you for the code.
Apparently I'm still sleepy 'cause I don't know how to use it.

Let me start from the beginning:

I wrapped cpp class and instantiated it from python.
When I tried it's method I got:
>>> import My
>>> a=My.Obj('a')
>>> a
<My.Obj object at 0x999999>    # faked
>>> a.name
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: bad argument type for built-in operation

I certainly would like to have cpp traceback through BPL library code (I'm
using debug version) but I don't know how.
I feel like having a key to the chamber with gold but see no lock around,
only walls. ;)
Please guide me a couple steps further.

Mike








More information about the Cplusplus-sig mailing list