[Zope-dev] Calling Catalog from python script

R. David Murray bitz@bitdance.com
Fri, 16 Feb 2001 14:50:59 -0500 (EST)


On Fri, 16 Feb 2001, Steve Alexander wrote:
> > This is 2.3.0, I suppose I should try the new beta just for kicks...
> 
> Yes, do try the new beta. If this is what I think it is, it is fixed in the latest
> 2.3, as I submitted the patch that fixed it :-)
> 
> Are your objects traversed to through an object that does __bobo_traverse__
> -- like a ZPatterns Specialist, for example?

Yes, the items come out of a Specialist.

However, upgrading to 2.3.1b1 did not solve the problem.  I don't see any
changes to getObject.

> The patch to ZCatalog brains makes it fall back on resolve_url, which works
> just fine.

So I changed getObject to wrap the try/except around only the restrictedTraverse
call and moved the call to resovle_url outside that, and that seems to
have fixed the problem.

Thanks, Steve!  You might want to look to see where your patch went,
though <wry grin>.

--RDM