[Zope3-Users] Re: Books example
Sébastien VINOT
sebastien.vinot at logisphere.fr
Sun Sep 10 04:13:06 EDT 2006
Kim L. Jacobsen a écrit :
> Philipp,
>
> Regarding this subject... When I try the examples from chapter 7 in your book, I get the following error, when I try to add a Recipe. I simple can't figure out, how to resolve it. Any suggestions?
>
> I'm using Zope 3.2.1
>
> Regards,
> Kim
>
> ---------------------------
>
> Traceback (innermost last):
> Module zope.publisher.publish, line 138, in publish
> result = publication.callObject(request, object)
> Module zope.app.publication.zopepublication, line 161, in callObject
> return mapply(ob, request.getPositionalArguments(), request)
> Module zope.publisher.publish, line 113, in mapply
> return debug_call(object, args)
> - __traceback_info__: <bound method +.action of <zope.app.publisher.browser.viewmeta.+ object at 0xb58c54ac>>
> Module zope.publisher.publish, line 119, in debug_call
> return object(*args)
> Module zope.app.container.browser.adding, line 128, in action
> name=view_name) is not None:
> Module zope.component, line 165, in queryMultiAdapter
> return sitemanager.queryMultiAdapter(objects, interface, name, default)
> Module zope.component.site, line 75, in queryMultiAdapter
> default)
> Module zope.interface.adapter, line 475, in queryMultiAdapter
> return factory(*objects)
> Module zope.app.form.browser.editview, line 64, in __init__
> self._setUpWidgets()
> Module zope.app.form.browser.add, line 49, in _setUpWidgets
> setUpWidgets(self, self.schema, IInputWidget, names=self.fieldNames)
> Module zope.app.form.utility, line 153, in setUpWidgets
> context=context)
> Module zope.app.form.utility, line 101, in setUpWidget
> widget = widget(field.bind(context), view.request)
> Module zope.app.form, line 120, in __call__
> return self._create(args)
> Module zope.app.form, line 102, in _create
> instance = self._widget_factory(*args)
> TypeError: __init__() takes exactly 3 arguments (4 given)
>
>
>
Hello Kim,
After investigations on the web I found the error :
Change :"from ... SimpleInputWidget" by :
from zope.app.form.browser.sequencewidget import SequenceWidget
And then replace "class Dyn...(SimpleInputWidget):" by "class
Dyn(SequenceWidget):"
Sebastien
More information about the Zope3-users
mailing list