[Zope3-Users] z3c.form and subforms in an AddForm?

Maciej Wisniowski maciej.wisniowski at coig.katowice.pl
Tue Jul 3 05:38:44 EDT 2007

> On Friday 22 June 2007 14:36, Mats Nordgren wrote:
>> I'm still having the ErrorViewSnippet problem.  I've gone over and over the
>> message example in formdemo and can't see anything different in my setup
>> from the demo.  The demo works fine but mine throws the ErrorViewSnippet
>> error when I submit an AddForm with missing input.  EditForm works correct
>> though.
> This is really strange and makes no sense. It seems that the error view 
> snippet has no widget attribute. But this is impossible, since it is always 
> assigned in the constructor.
> Could you send me some working code, like the package you are working on?

Did you find cause of this problem? I get same error and
still can't realize what is wrong.

End of my error traceback is:

  File "/opt/Zope/Zope-3.3.1/lib/python/zope/tales/tales.py", line 696,
in evaluate
    return expression(self)
   - /opt/Zope/instancje/z331/lib/python/z3c/formui/div-form.pt
   - Line 38, Column 12
   - Expression: <PathExpr standard:u'error/widget/label'>
   - Names:
      {'args': (),
       'context': <zope.app.folder.folder.Folder object at 0x8897a6c>,
       'default': <object object at 0xb7dc5568>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <zc.resourcelibrary.publication.Request instance
<zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile object
at 0x903fe6c>,
       'usage': <zope.pagetemplate.pagetemplate.TemplateUsage object at
       'view': <z3c.pagelet.zcml.MyTestAddForm object at 0x9a6c7cc>,
       'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper
object at 0x9a6b90c>}
  File "/opt/Zope/Zope-3.3.1/lib/python/zope/tales/expressions.py", line
217, in __call__
    return self._eval(econtext)
  File "/opt/Zope/Zope-3.3.1/lib/python/zope/tales/expressions.py", line
194, in _eval
    ob = self._subexprs[-1](econtext)
  File "/opt/Zope/Zope-3.3.1/lib/python/zope/tales/expressions.py", line
124, in _eval
    ob = self._traverser(ob, element, econtext)
"/opt/Zope/Zope-3.3.1/lib/python/zope/app/pagetemplate/engine.py", line
68, in __call__
  File "/opt/Zope/Zope-3.3.1/lib/python/zope/traversing/adapters.py",
line 164, in traversePathElement
    return traversable.traverse(nm, further_path)
   - __traceback_info__: (<ErrorViewSnippet for RequiredMissing>, 'widget')
  File "/opt/Zope/Zope-3.3.1/lib/python/zope/traversing/adapters.py",
line 52, in traverse
    raise TraversalError(subject, name)
   - __traceback_info__: (<ErrorViewSnippet for RequiredMissing>,
'widget', ['label'])
TraversalError: (<ErrorViewSnippet for RequiredMissing>, 'widget')

Maciej Wisniowski

More information about the Zope3-users mailing list