__call__() takes exactly 1 argument (4 given) !!!!!!!!!!!
Guys, I am getting this message out of HelpSys/STXTopic and Products/CMFCore/PortalContent using Zope2.6.2b2 and CMF1.3.1. It's happening out of ZPublisher/Publish calling the default method to publish the object. For some reason, the delivered code works fine in development (Linux 2.4.21, Python2.1.3, Zope 2.6.2b2, CMF1.3.1) but not in production, which strangely has the same software (different hardware though). I've patched both the offending __call__ method's function signatures to include REQUEST, *args, and **kw - which I believe is the standard signature for stuff called from ZPublisher. I am however quite baffled why (i) this has not been done for these already; (ii) why indeed my development environment works; (iii) why this issue hasn't bothered anyone else!!!! Am I missing something????? If not, does anyone want me to post the patches??? Cheers, Alan _________________________________________________________________ Surf the net and talk on the phone with Xtra Jetstream @ http://www.xtra.co.nz/products/0,,5803,00.html !
alan milligan wrote at 2003-8-18 09:41 +0000:
... I am getting this message out of HelpSys/STXTopic and Products/CMFCore/PortalContent using Zope2.6.2b2 and CMF1.3.1.
It's happening out of ZPublisher/Publish calling the default method to publish the object.
For some reason, the delivered code works fine in development (Linux 2.4.21, Python2.1.3, Zope 2.6.2b2, CMF1.3.1) but not in production, which strangely has the same software (different hardware though).
I've patched both the offending __call__ method's function signatures to include REQUEST, *args, and **kw - which I believe is the standard signature for stuff called from ZPublisher.
This is not the case. Quite to the contrary, ZPublisher (its "mapply") cannot handle "*args" and "**kw" argument definitions. For some unknown reason, "mapply" seems to get the method signature wrong and thinks it has to call the object with 4 arguments. Apparently, your change did not modify what "mapply" sees and your object now accepts (almost) arbitrary many arguments. "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? Dieter
participants (2)
-
alan milligan -
Dieter Maurer