Analysing tracebacks (was: [Zope] LockableItem)

Dieter Maurer dieter@handshake.de
Sat, 27 Oct 2001 20:10:48 +0200 (CEST)


belen@netcom.no writes:
 > I have a very weird problem. I am appending to a list a piece of data 
 > that I have retrieved from a ZSQLMethod within an external method. That 
 > piece of data happens to be type date. This is with Zope 2.4.
 > 
 > Error Type: TypeError
 > Error Value: __init__() takes at least 3 arguments (2 given)
 > 
 > Traceback (innermost last):
 >   ....
 >     (Object: getDataForWeeklyReport)
 >     (Info: ((18,), {}, None))
 >   File C:\Zope\BelenSite\Extensions\getDataForWeeklyReport.py, line 68, 
 > in getDataForWeeklyReport
 >     (Object: LockableItem)
 > TypeError: (see above)
When you get a traceback, you look at "Error Type", "Error Value"
and usually a few traceback lines near the traceback end.

In your case, in line 68 of "getDataForWeeklyReport.py"
an object (instance) is created with one missing argument.
The constructor (__init__) wants 3 arguments but it is called
with only one.
Note, that the first parameter, is provided automatically,
unless "__init__" is called explicitly. Thus, your
code probably contains something like:

     <class>(arg)

where "<class>" is the name of a Python class.



Dieter