[Zope-dev] __call__() takes exactly 1 argument (4 given) !!!!!!!!!!!

Dieter Maurer dieter at handshake.de
Sun Aug 24 01:13:03 EDT 2003


alan milligan wrote at 2003-8-20 04:43 +0000:
 > ...
 > >"mapply" is often tricked out by a "func_code" definition.
 > >Maybe, your class has such an attribute and it does not
 > >match the "__call__" signature?
 > 
 > Hmmm - this isn't MY class, it's HelpSys::STXTopic.  I can't see any 
 > func_code definition in the HelpSys source.  STXTopic's __call__ function is 
 > declared as __call__(self, REQUEST=None) which looks quite fine to me.
 > 
 > Therefore mapply is getting it wrong and passing too many parameters into 
 > this call.  How do I discover what mapply is passing???

You use a debugger.

I would add "import pdb; pdb.set_trace()" in "mapply",
start Zope in a console window and make the failing request.

Zope will enter the debugger at the "set_trace".
Read the "pdb" documentation (--> Python library reference)
about the available commands.


Dieter



More information about the Zope-Dev mailing list