[Zope] getPhysicalRoot and <Special Object Used to Force Acquisition>

Gabriel Genellina gagenellina@softlab.com.ar
Fri, 01 Feb 2002 19:25:19 -0300


Hi

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???)
This was for a while, I tried several ways to circumvent this problem, and 
I was happy when I found something that worked fine.
But when I tried the original code again to post here, it worked fine (as 
usual!) and now type(self.getPhysicalRoot)=type <'Python Method'> (as 
should be, I guess)
I swear I didnt change anything but a few lines on my product!!! Nor even 
restarted Zope, just refreshed my product. And it's my own local install, 
so nobody else was working at the same server. So I don't understand why it 
began to fail, and why it suddenly was working OK again...


Gabriel Genellina
Softlab SRL