[Zope] Problem migrating from 2.6.3 to 2.7

Dieter Maurer dieter at handshake.de
Fri Feb 13 14:19:49 EST 2004


Jean-Francois.Doyon at CCRS.NRCan.gc.ca wrote at 2004-2-12 18:08 -0500:
>I've just switched to 2.7 from 2.6.3 and everything seems to work well
>except for one rather bizarre event:
>
>I have a specific content type that can't be viewed, accessed or otherwise
>used/viewed in any way without sending Zope into an infinite loop!
>
>Here's the error I get:
>
>Zope Error
>Zope has encountered an error while publishing this resource.
>
>Error Type: RuntimeError
>Error Value: maximum recursion depth exceeded
> ...
>Module ZPublisher.Publish, line 94, in publish 
>Module Zope.App.startup, line 257, 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> 
>Module OFS.SimpleItem, line 310, in getId 
> ...

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".


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__").


-- 
Dieter



More information about the Zope mailing list