Kim L. Jacobsen a écrit :

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



Traceback (innermost last):
  Module zope.publisher.publish, line 138, in publish
    result = publication.callObject(request, object)
  Module, 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 
< object at 0xb58c54ac>>
  Module zope.publisher.publish, line 119, in debug_call
    return object(*args)
  Module, 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, line 75, in queryMultiAdapter
  Module zope.interface.adapter, line 475, in queryMultiAdapter
    return factory(*objects)
  Module, line 64, in __init__
  Module, line 49, in _setUpWidgets
    setUpWidgets(self, self.schema, IInputWidget, names=self.fieldNames)
  Module, line 153, in setUpWidgets
  Module, line 101, in setUpWidget
    widget = widget(field.bind(context), view.request)
  Module, line 120, in __call__
    return self._create(args)
  Module, 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 import SequenceWidget

And then replace "class Dyn...(SimpleInputWidget):" by "class Dyn(SequenceWidget):"

Zope3-users mailing list

Reply via email to