[Zope] TTWTYPE atribute error

Dieter Maurer dieter at handshake.de
Tue Dec 9 14:13:02 EST 2003


Patrick Gelin wrote at 2003-12-9 10:29 +0100:
> ...
>User Name (User Id)   GelinP (GelinP)
>Request URL
>http://rpnlinux1.rpn.ch/Members/GelinP/Tests/Paneau1/ws_Homework.2003-12-09.0045/portal_form/ttw_edit_form
>Exception Type AttributeError
>Exception Value __call__
>
>Traceback (innermost last):
> ....
>    * Module Products.Formulator.Field, line 237, in _validate_helper
>    * Module Products.Formulator.MethodField, line 40, in __call__
>
>AttributeError: __call__
>
>Below is Formulator.MethodFiel:
>
>class Method(Persistent, Acquisition.Implicit):
>    """A method object; calls method name in acquisition context.
>    """
>    def __init__(self, method_name):
>        self.method_name = method_name
>
>    def __call__(self, *arg, **kw):
>        # get method from acquisition path
>        method = getattr(self, self.method_name)
>        # check if we have 'View' permission for this method
>        # (raises error if not)
>        getSecurityManager().checkPermission('View', method)
>        # okay, execute it with supplied arguments
>line 40 ->   return apply(method, arg, kw)

This means "method" is not callable.
Almost surely, it is not what you expect.

-- 
Dieter



More information about the Zope mailing list