[Zope] global name 'context' not defined in TrustedFSPageTemplate

Jürgen Herrmann Juergen.Herrmann at XLhost.de
Thu Jun 1 11:51:51 EDT 2006


hi!

i get the following error in one of my trusted page template files:

Traceback (innermost last):
    * Module ZPublisher.Publish, line 113, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 40, in call_object
    * Module Shared.DC.Scripts.Bindings, line 311, in __call__
    * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
    * Module Products.CMFCore.FSPageTemplate, line 195, in _exec
    * Module Products.TrustedExecutables.TrustedFSPageTemplate, line 31, in pt_render
    * Module Products.PageTemplates.PageTemplate, line 104, in pt_render
      <TrustedFSPageTemplate at /bliss/BlissCalendar/show_content_week>
    * Module TAL.TALInterpreter, line 238, in __call__
    * Module TAL.TALInterpreter, line 281, in interpret
    * Module TAL.TALInterpreter, line 507, in do_setLocal_tal
    * Module Products.PageTemplates.TALES, line 221, in evaluate
      URL: file:/home/bliss/zope/Products/BlissCalendar/www/BlissCalendar/show_content_week.xpt
      Line 3, Column 0
      Expression: <PythonExpr dates.sort(lambda a,b: cmp(context.utils.text2date(a),
context.utils.text2date(b)))>
      Names:

      {'container': <BlissCalendar at /bliss/BlissCalendar>,
       'context': <BlissCalendar at /bliss/BlissCalendar>,
       'default': <Products.PageTemplates.TALES.Default instance at 0xb703850c>,
       'here': <BlissCalendar at /bliss/BlissCalendar>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xb5d9426c>,
       'modules': <Products.TrustedExecutables.TrustedExpression._ModuleImporter instance at
0xb6fa1b8c>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0xb5d9426c>,
       'request': <HTTPRequest, URL=https://bliss.local/BlissCalendar/show_content_week>,
       'root': <Application at >,
       'template': <TrustedFSPageTemplate at /bliss/BlissCalendar/show_content_week>,
       'traverse_subpath': [],
       'user': <User at /bliss/data/Users/instances/juherm00 used for /bliss/acl_users>}

    * Module Products.PageTemplates.PythonExpr, line 70, in __call__
      __traceback_info__: dates.sort(lambda a,b: cmp(context.utils.text2date(a),
context.utils.text2date(b)))
    * Module <string>, line 2, in f
    * Module <string>, line 2, in <lambda>

NameError: global name 'context' is not defined

the "Names" section clearly shows a 'context' entry... anybody seen this
or something similar before? (btw. here doesn't work either)

regards, juergen
_______________________________________________________________________

>> XLhost.de - eXperts in Linux hosting <<

Jürgen Herrmann
Bruderwöhrdstraße 15b, DE-93051 Regensburg

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)721 151 463027
WEB:  http://www.XLhost.de


More information about the Zope mailing list