[Zope-CMF] __call__() takes at most 5 arguments

Kevin Carlson khcarlso@bellsouth.net
Thu, 9 May 2002 09:03:07 -0400


You're right, Harry.  I fixed the problem already. And as you stated, it was
fairly self explanatory, although a bit confusing in origin (most likely due
to a momentary lapse in reason...).  After searching the news group archives
and the Zope.org site I didn't find anything about how to solve this
particular problem...

For those interested, the problem arose because I was trying to call a ZSQL
Method with a bunch of arguments.  Easy, right?  Well, easy until you forget
to pass the arguments as keywords.  The __call__ method of the ZSQL Method
takes exactly five arguments as the error stated the last of which is a **kw
argument which is how I needed to pass the SQL arguments to the method.

Kevin

-----Original Message-----
From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
Of Harry Wilkinson
Sent: Thursday, May 09, 2002 7:44 AM
To: Kevin Carlson; zope-cmf group
Subject: Re: [Zope-CMF] __call__() takes at most 5 arguments


On Wednesday 08 May 2002 5:47 pm, Kevin Carlson wrote:
> I am calling a ZSQL method from a python script using "context.add(param1,
> etc...)" where add is the name of the ZSQL method.  It is being called but
> the error message I am getting states that "__call__() takes at most 5
> arguments (6 given)".
>
> Anyone have an idea why this is so?
>
> Kevin
>

Maybe if you gave some more info on the code that is calling this method it
would be easier to say why this is happening.  On the face of it, that looks
like a perfectly reasonable error message that is pretty self-explanatory.
I
suppose there is something more to this, or you would have fixed the problem
already.


_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
http://lists.zope.org/mailman/listinfo/zope-cmf

See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests