[Zope] Migrating to Zope 2.10.1 breaks unrestrictedTraverse
Ian McCracken
ian at zenoss.com
Thu Jan 25 16:12:01 EST 2007
I'm trying to get an object by walking a path. Previously, I used
baseobject.unrestrictedTraverse(path). Upon migrating to 2.10.1,
though, doing the same thing often produces the following error:
File "/usr/local/zenoss/Products/ZenModel/Organizer.py", line 148, in getOrganizer
return self.getDmdRoot(self.dmdRootName).unrestrictedTraverse(path)
File "usr/local/zenoss/lib/python/OFS/Traversable.py", line 259, in unrestrictedTraverse
AttributeError: REQUEST
The problem appears to be that the Traversable mixin assumes that
self.REQUEST will be available; since we're calling it from outside
Zope, though, there is no request. Any thoughts? Why was this changed,
and is there an extant way to get the same result without just writing a
simple method that walks the path?
Thanks,
Ian McCracken
More information about the Zope
mailing list