Thanks for the tips.

> I may be forgetting something here... but this should certainly give
> you a head start. There's a bunch of very good information on this in
> these files:
> zope/app/form/browser/widgets.txt
> zope/app/form/browser/objectwidget.txt
> Hmmm, looking through these again, these are really good examples. Pay
> more attention to them than to what I wrote above ;-)

I've tried making the poll demo as described in widgets.txt to get the
hang of this, but unfortunately it doesn't seem to work. When I try to
restart zope it give the following error:

    ZopeXMLConfigurationError: File "C:\Python24\Lib\site-packages\zope\app\demo
\poll\configure.zcml", line 5.4-6.47
    ConfigurationError: ('Unrecognized parameters:', 'permission')

The relevant section of the configure.zcml file reads:

    <factory id=""
             permission="zope.ManageContent" />

Removing the permission section brings up an error further on in the config:

    ZopeXMLConfigurationError: File "C:\Python24\Lib\site-packages\zope\app\demo
\poll\configure.zcml", line 53.4-59.10
    ConfigurationError: ('Unrecognized parameters:', 'content_factory')

which refers to a section that reads:

        title="Poll Demo"
        description="Poll Demo"

Removing the content_factory line raises an error along the lines of
"must specify either a factory or a class". Changing it to read:


allows Zope to start up, but when I click on the "Poll Demo" add menu
item that appears it raises "System Error". From the traceback:

Exception Value
__init__() takes at least 4 arguments (3 given)

(full traceback below)

I'm pretty sure I've copied and pasted all the sections of the demo
from the widgets.txt file into the right files, but I could have done
something else stupid. Or is there something genuinely amiss with the

Any thoughts?


Traceback (innermost last):

    * Module zope.publisher.publish, line 138, in publish
      result = publication.callObject(request, object)
    * Module, line 164, 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 0x02552630>>
    * 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 481, 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 97, in __call__
      instance = self._widget_factory(*args)

TypeError: __init__() takes at least 4 arguments (3 given)
Zope3-users mailing list

Reply via email to