[Zope] OFS.SimpleItem problem with maximum recursion depth exceeded
Error
Gautam Saha
gsaha at imsa.edu
Tue Jun 28 10:51:08 EDT 2005
Hi:
I have a simple schema based on the "Article" ArchExample schema which
uses the " RichWidget" for file upload.
The product worked fine in Zope2.6.1/Plone1 but does not work in
zope2.7.5-final/Plone2.0.5.
I am getting a "RuntimeError: maximum recursion depth exceeded" error
while trying to view the uploaded file
-------
Traceback (innermost last):
Module ZPublisher.Publish, line 175, in publish_module_standard
Module Products.PlacelessTranslationService.PatchStringIO, line 51, in
new_publish
Module ZPublisher.Publish, line 132, in publish
Module Zope.App.startup, line 204, in zpublisher_exception_hook
Module ZPublisher.Publish, line 95, in publish
Module Zope.App.startup, line 258, in recordMetaData
Module OFS.SimpleItem, line 333, in getPhysicalPath
Module OFS.SimpleItem, line 76, in <lambda>
Module OFS.SimpleItem, line 310, in getId
Module OFS.SimpleItem, line 76, in <lambda>
...
...
Module OFS.SimpleItem, line 310, in getId
Module OFS.SimpleItem, line 76, in <lambda>
RuntimeError: maximum recursion depth exceeded (Also, an error occurred
while attempting to render the standard error message.)
----- END Traceback
I googled and found that it is zope bug (issue# 1253,
URL:http://www.zope.org/Collectors/Zope/1253).
I also, found similar this error is documented in Bug#928693 & 909894
in Plone2.
Diater suggested a workaround (in zope Issue# 1253) which I don't quite
understand being a python newbie.
From Dieter:
>This is a bug in "OFS.SimpleItem.Item_w__name__".
>
> In its base class, "__name__" is defined as
> "ComputedAttribute(lambda self: self.getId())"
> and it defines "getId()" to return "self.__name__".
> Apparently, this is an infinite recursion.
>
>Please file a bug report to "http://www.zope.org/Collectors/Zope
<http://www.zope.org/Collectors/Zope/1253/>".
>
>You can fix this problem by giving "Item_w__name__" a default
>class level attribute or "__name__ = ''".
>
>You can work around the bug by assigning an "id" for your
>object with its "_setId" method (this overrides "__name__").
Could someone please tell me where/what code I should make this changes?
I posted this before in Plone list but did not get any response, may be
because it is
a Zope issue.
My platform details:
Zope Version (Zope 2.7.5-final, python 2.3.4, freebsd5)
Python Version 2.3.4 (#2, Oct 21 2004, 17:49:27) [GCC 3.3.3 [FreeBSD]
20031106]
Plone version: 2.0.5
Archetype version: 1.2.5-rc5
Any help is greatly appreciated.
Gautam
More information about the Zope
mailing list