[Zope] TTWTYPE atribute error
Patrick Gelin
patrick.gelin at rpn.ch
Tue Dec 9 04:29:23 EST 2003
Hi,
I've just installed TTWTYPE and add the AddTTwObject permission to my
container (deriver from Plone folder). if I want to validate a TTWObject I
add I get the error message:
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 ZPublisher.Publish, line 98, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Products.CMFPlone.FormTool, line 233, in __call__
* Module Products.CMFPlone.FormTool, line 268, in _validate
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Products.CMFCore.FSPythonScript, line 92, in __call__
* Module Shared.DC.Scripts.Bindings, line 252, in __call__
* Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
* Module Products.CMFCore.FSPythonScript, line 126, in _exec
__traceback_info__: ({'script': <FSPythonScript at
/myrpn/validate_ttw_edit used for
/myrpn/Members/GelinP/Tests/Paneau1/ws_Homework.2003-12-09.0045>,
'context': <TTWObject at
/myrpn/Members/GelinP/Tests/Paneau1/ws_Homework.2003-12-09.0045>,
'container': <PloneSite instance at 8db1180>, 'traverse_subpath': []}, (),
{}, None)
* Module Script (Python), line 13, in validate_ttw_edit
* Module Products.Formulator.Form, line 352, in validate_all_to_request
* Module Products.Formulator.Form, line 333, in validate_all
* Module Products.Formulator.Field, line 245, in validate
* 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)
Is there anybody to help me ?
Thanks.
More information about the Zope
mailing list