[Zope] NameError when script called from product

Ken ken@room17.org
Thu, 17 Apr 2003 10:13:17 +0200 (CEST)


Hi all,

The product I am using (KebasData) has a property called render_method, which is the name of a dtml method that gets called from within the index_html of an instance, like so:

<dtml-var "_[render_method]">

My render method is called viewResults and it calls a script (Python) called PageListOutput, which is described in the ZopeLabs recipe found at http://www.zopelabs.com/cookbook/1019946889.

Normally it is possible to display the rendered KebasData like so: 

http://mysite.org/kebasdata_instance

which has always worked for me but not this time. 
What is strange, is that it works fine when called like so:

http://mysite.org/kebasdata_instance/viewResults

which, to my feeble understanding, should be no different.. 

The traceback:

File /usr/sites/www/zope/lib/python/DocumentTemplate/DT_Util.py, line 159, in eval
    (Object: PageListOutput('.',page,step,_.len(match)))
    (Info: _)
  File &lt;string&gt;, line 2, in f
NameError: (see above)

Can anyone tell me what is missing? 

Details: Zope 2.5.1, Python 2.1.3 (binary), FreeBSD4.3

Thanks,

Ken