[Zope] RestrictedPython module problem

Marcin Dobrzycki dynia at mat.uni.torun.pl
Mon May 31 08:07:01 EDT 2004


Hi. I try to transfer my application to newer versions of Zope and Plone.
I've been using Zope 2.6. (Python 2.1.3), Plone 1.0.?. Now I want to use
Zope 2.7, Plone 2.0.?. After dealing with some simple problems I got
something I couldnt'n handle. Looks like implementation of
RestrictedPython module has changed, the getiter (_getiter_) variable has
been used, and I got trouble because of that. Stack trace:
--- start ----
 ............
 ............
--- error message content ---
    * Expression:
standard:'options/slots_mapping|template/prepare_slots|here/prepare_slots|nothing'
      Names:

{'container': <PloneSite instance at 287921a0>,
 'context': <Document at /bmpg/ff_home/dg>,
 'default': <Products.PageTemplates.TALES.Default instance at 0x279f57ec>,
 'here': <Document at /bmpg/ff_home/dg>,
 'loop': <SafeMapping instance at 287b81b0>,
 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
instance at 0x279f52ac>,
 'nothing': None,
 'options': {'args': ()},
 'repeat': <SafeMapping instance at 287b81b0>,
 'request': <HTTPRequest, URL=http://192.168.0.9:8888/bmpg/index_html>,
 'root': <Application instance at 28788d10>,
 'template': <ZopePageTemplate at /bmpg/document_view used for
/bmpg/ff_home/dg>,
 'traverse_subpath': [],
 'user': Anonymous User}

    * Module Products.PageTemplates.Expressions, line 201, in __call__
    * Module Products.PageTemplates.Expressions, line 196, in _eval
    * Module Products.PageTemplates.Expressions, line 95, in render
    * Module Products.PageTemplates.ZRPythonExpr, line 73, in call_with_ns
    * Module Products.CMFCore.FSPythonScript, line 99, in
__render_with_namespace__
    * Module Shared.DC.Scripts.Bindings, line 320, in
__render_with_namespace__
    * Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
    * Module Products.CMFCore.FSPythonScript, line 160, in _exec
    * Module Script (Python), line 28, in prepare_slots
      <FSPythonScript at /bmpg/prepare_slots used for /bmpg/document_view>
      Line 28

NameError: global name '_getiter_' is not defined (Also, an error occurred
while attempting to render the standard error message.)

--- end ----

There's NO script in my app where I use getiter (or _getiter_) variable.
The questin is: Is there anybody who has got the same problem I have ?
Thanks for any help (straight answer, suggestions, etc...).

P.S. sorry for my english (not a native speaker).



More information about the Zope mailing list