listobject.c:101: bad argument to internal function

Jim Henry jamespp35 at yahoo.com
Wed Apr 17 19:33:23 EDT 2002


I have c code which constructs a python class and calls some methods in that
class (just two!).  That python class also constructs other classes.  There
are various lists in these 'second level' classes, and when traversing one
of these lists "for line in lines:", this error pops up, always on the last
item in the list.  I tried changing the code around in some of these
classes, and now the error happens on ANOTHER list (also being traversed
with "for ... in ...:" and also on the last item in the list).

I have gone over the C code, and it is VERY simple.  It passes one parameter
(a string) to the first python method it calls (and a "print" in that method
shows the string coming through just fine), and it passes no parameters to
the second python method (which is the one that fails).

All of this stuff works just fine when run directly in python.

Am using Python 2.2, btw.

Any ideas? (please!)

Jim Henry





More information about the Python-list mailing list