[ZODB-Dev] Weird InvalidObjectReference exception :-(

Chris Withers chrisw@nipltd.com
Mon, 07 Oct 2002 15:21:29 +0100


Toby Dickenson wrote:
>>
>>>If so, you might get some clues by firing up a new ClientStorage, loading
>>>that object, and inspecting it.
>>
> import your custom_zodb module in a new python process, and call your 
> ClientStorage's 'load' method specifying that oid as the first parameter, and 
> an empty string for the version as the second parameter. That will give you 
> the object pickle. Class name is as the start, other state after.

Well, tried that:

C:\client>set 
PYTHONPATH=C:\zope\2.6.0_cvs_19.9.02\;C:\zope\2.6.0_cvs_19.9.02\lib\python;

C:\client>C:\Zope\2-5-1_base\bin\python
Python 2.1.3 (#35, Apr  8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
 >>> import custom_zodb
 >>> x = custom_zodb.Storage.load('\x00\x00\x00\x00\x00\x06\xd6\xc3','')
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "C:\zope\2-5-1_base\lib\python\ZEO\ClientStorage.py", line 292, in load
     p = cache.load(oid, version)
   File "C:\zope\2.6.0_cvs_19.9.02\lib\python\ZEO\ClientCache.py", line 188, in l
oad
     p=self._get(oid, None)
AttributeError: ClientCache instance has no attribute '_get'
 >>>

What gives? Why is the 2.5.1 ClientStorage being used? (shouldn't matter, since 
they're both the exact same ZEO version...)

Also, would this give me any more info than Jeremy's patches have?
I (think I) know the class:
('BTrees._IOBTree', 'IOBucket')
...and the OID:
'\x00\x00\x00\x00\x00\x06\xd6\xc3'
...what I could really do with is the patch into the database...

>>Likewise, how would I do that?
> 
> delete the var/*.zec files.
> 
> (If you dont have any, then I guess you are using temporary client cache 
> files)

I couldn't find any in any of the Zope var directories I know of, so is there 
anything I need to do?

cheers,

Chris - ever seen me franticly screaming 'heylp'? It's coming...