[Zope] getPhysicalRoot and <Special Object Used to Force Acquisition>
Dieter Maurer
dieter@handshake.de
Mon, 4 Feb 2002 22:52:12 +0100
Gabriel Genellina writes:
> Inside a Python product, I tried to access another object this way:
>
> self.restrictedTraverse('/Folder/Object')
>
> This worked fine until this evening, when I got an error 'Object not callable'
> The error was on Traversable.py, function unrestrictedTraverse, line 166
> (Zope 2.4.3 (binary release, python 2.1, win32-x86), python 2.1.0, win32)
>
> self=self.getPhysicalRoot()
>
> When I printed type(self.getPhysicalRoot), I got: <Special Object Used to
> Force Acquisition>' (what's that???)
That tells the acquisition machinery to use acquisition to
get at the object, even if this is an explicit acquisition wrapper.
See documentation in "lib/Components/ExtensionClass/doc/acquistion.html"
for details.
Is it possible that your object ("self") was not acquisition wrapped
(i.e. used inside "__init__", "__setstate__" or "__getattr__")?
Dieter