[Zope] Trying to get tree working

Frans C.H. Schneider f.schneider@nido.nl
Wed, 5 Dec 2001 11:22:10 +0100


> Frans C.H. Schneider writes:
>  > ...
>  > <dtml-let ps_comp=ps_par>
>  > <dtml-tree id=ps_comp
> branches_expr="ps_childLookup(ps_par=ps_comp)">
>  >  <b><dtml-var ps_comp></b> <dtml-var ps_start>
>  > </dtml-tree>
>  > </dtml-let>
>  >
>  >
>  > It works for the first time but when I try to expand it I
> get a key error on
>  > ps_par.
>  >
>  > What goes wrong??
> I do not have an answer for your question.
>
> But you should get a traceback and this traceback should tell you
> where the "KeyError" is detected. This may give you a hint...
>
>
> Dieter
>
This is the traceback.

Error Type: KeyError
Error Value: ps_par

Traceback (innermost last):
  File /opt/Zope-2.4.2-src/lib/python/ZPublisher/Publish.py, line 223, in
publish_module
  File /opt/Zope-2.4.2-src/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /opt/Zope-2.4.2-src/lib/python/Zope/__init__.py, line 226, in
zpublisher_exception_hook
    (Object: Artikelen)
  File /opt/Zope-2.4.2-src/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /opt/Zope-2.4.2-src/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: bmpsiq)
  File /opt/Zope-2.4.2-src/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: bmpsiq)
  File /opt/Zope-2.4.2-src/lib/python/OFS/DTMLDocument.py, line 199, in
__call__
    (Object: bmpsiq)
  File /opt/Zope-2.4.2-src/lib/python/DocumentTemplate/DT_String.py, line
546, in __call__
    (Object: bmpsiq)
  File /opt/Zope-2.4.2-src/lib/python/DocumentTemplate/DT_Let.py, line 146,
in render
    (Object: ps_comp=ps_par)
KeyError: (see above)

I guess this has to do with the ps_par not being in the namespace the moment
I try to expend the tree: it was passed from the calling screen in the first
place. If I replace the line with dtml-let ps_comp=ps_par> with dtml-let
ps_comp="'partnumber I know'"> it works fine for the item I specify with the
partnumber.

TIA


Frans