[Zope-CMF] DiscussionItem view error

Dieter Maurer dieter@handshake.de
Fri, 13 Dec 2002 21:46:19 +0100


Mark Gibson writes:
 > I'm allowing discussions for a piece of custom content.  I can create 
 > comments fine, but I'm having problems viewing them.
 > 
 > If I use:
 > http://mysite.com:8080/portal/qualifications/talkback/1039557500/discussionitem_view
 > without a problem, but If I use:
 > 
 > http://mysite.com:8080/portal/qualifications/talkback/1039557500
 > (not supplying the view explicitly)
 > 
 > I receive this error:
 > ----
 > Error Type: TypeError
 > Error Value: __call__() takes exactly 1 argument (4 given)
 > Traceback (innermost last):
 > 
 >   Module ZPublisher.Publish, line 98, in publish
 >   Module ZPublisher.mapply, line 88, in mapply
 >   Module ZPublisher.Publish, line 39, in call_object
 > ----
 > Not much to go on.  Any idea of what the problem might be?
 > Zope 2.6
 > CMF-1.3
Looks like a bug in "mapply":

  It's task is to determine what arguments the method needs
  and call it with the correct arguments.

  In your case, it thinks the method needs 4 arguments while,
  in fact, it need only a single one.

  I would use debugging to determine why.

  You can add "import pdb; pdb.set_trace()" at the beginning
  of "mapply.mapply" and then single step through the function.
  

Dieter