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

Andrew Sydelko andrew@sydelko.org
Wed, 6 Mar 2002 15:39:15 -0500


On Wednesday 06 March 2002 15:25, you wrote:
> On 06 March 2002, Andrew Sydelko said:
> > If I get an error like this:
> >
> > 2002-03-06T19:39:43 ERROR(200) ZODB Couldn't load state for
> > '\x00\x00\x00\x00\x00\x08\x1dS'
> > Traceback (innermost last):
> >   File
> > /data/www/Zope.9/src/Zope-2.5.0b4-src/lib/python/ZODB/Connection.py, line
> > 471, in setstate
> > ImportError: No module named Splitter
> >
> > how can I see what object '\x00\x00\x00\x00\x00\x08\x1dS' is referring
> > to?
>
>   storage = ... open Storage ...
>   db = DB(storage)
>   conn = db.open()
>   object = conn['\x00\x00\x00\x00\x00\x08\x1dS']
>
> However, it'll probably crash again with the same ImportError.  Try it
> and see.

Yep, that's exactly what happened.

> 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.

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?

--andy.