[ZODB-Dev] Looking for a specific object...

Greg Ward gward@mems-exchange.org
Wed, 6 Mar 2002 16:11:19 -0500


On 06 March 2002, Andrew Sydelko said:
> > Are you sure your sys.path is correct, ie. Python can find all the
> > modules that provide classes whose instances are pickled in your
> > database?
> 
> Well, our database was first created in January of 2001 using whatever
> version of Zope was available at the time. I'm thinking there is some
> cruft (like this object) that references things that no longer
> exist... So I'd like to be able to find which object is trying to use
> this "Splitter" module and either remove that object or figure out
> what to do from there.

Right, yes, the "I renamed my class/module" problem.

> Is there anyway I can trick it into thinking that there is a module named 
> Splitter, but one that just lets me see what the path to the object is?

Create an empty Splitter.py somewhere in sys.path.  Then you'll have to
create a dummy class in it to satisfy this object; if you can't remember
the name of the class, load it again and watch for the import error --
it should have the class name this time.

        Greg
-- 
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange                            http://www.mems-exchange.org