[Zope3-Users] Configuration Problems?

Marius Gedminas marius at gedmin.as
Fri Aug 1 14:13:12 EDT 2008


On Fri, Aug 01, 2008 at 12:29:28PM -0300, Tim Cook wrote:
> When it comes to actually viewing our content with a browser we fail.  I
> thought that certainly a workshop full of bright people working all day
> on this problem would be able to discover what is missing; nope.
...
> we get a ComponentLookupError (traceback below).  I just can't seem to
> figure out WHERE the look up error is coming from.  

The traceback shows you the WHERE, but that's not interesting.  The WHY
is interesting, and I could make a guess.

> The source is available at:
> http://www.openehr.org/svn/ref_impl_python/TRUNK/oship 
...
> =============================================================
> URL: http://127.0.0.1:8080/%2B%2Bskin%2B%
> 2BDemoAT/AR/openEHR-EHR-EVALUATION.goal.v1/%40%40index.html
...
> Module z3c.form.form:189 in __call__         
> Module z3c.form.form:184 in update         
> Module z3c.form.form:134 in update         
> Module z3c.form.form:126 in updateWidgets         
> Module z3c.form.field:241 in update         
> Module zope.component._api:103 in getMultiAdapter         
> <<      adapter = queryMultiAdapter(objects, interface, name,
> context=context)
>         if adapter is None:
>             raise ComponentLookupError(objects, interface, name)
>         return adapter>>  raise ComponentLookupError(objects, interface,
> name)
> ComponentLookupError: ((<zope.schema._bootstrapfields.Field object at
> 0x7f9af8717ad0>, <zope.publisher.browser.BrowserRequest instance
> URL=http://127.0.0.1:8080/++skin
> ++DemoAT/AR/openEHR-EHR-EVALUATION.goal.v1/@@index.html>),
> <InterfaceClass z3c.form.interfaces.IFieldWidget>, u'')
> =============================================================  

Your form schema contains a plain Field() field.  Zope has no widgets
for this.

Usually this happens when you define a content object's interface
inheriting from IContained or ILocation.  The fix is to omit __name__
and __parent__ from the interface.

Without looking very deeply into your project, I suspect
http://www.openehr.org/svn/ref_impl_python/TRUNK/oship/src/oship/browser/atdemo.py

and I'd change it to

    class ATDemoDisplayForm(form.Form):
        """A simple display form Archetypes."""

        fields = field.Fields(IArchetype).omit('__name__', '__parent__')
        mode = DISPLAY_MODE

Marius Gedminas
-- 
If it wasn't for C, we'd be using BASI, PASAL and OBOL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20080801/fd6b4465/attachment.bin


More information about the Zope3-users mailing list