[ZODB-Dev] Random POSKeyErrors

Jim Fulton jim at zope.com
Wed Jul 21 13:07:05 EDT 2010


On Wed, Jul 21, 2010 at 12:40 PM, Pedro Ferreira
<jose.pedro.ferreira at cern.ch> wrote:
>
>> http://www.zopyx.de/blog/checking-your-zodb-storages-for-poskey-errors
>>
>>
>
> Thanks a lot. Unfortunately, it seems like this script only works for 64
> bit oids... which doesn't seem to be the case.
>
> """
> Traceback (most recent call last):
>   File "/usr/bin/multi-zodb-check-refs", line 8, in <module>
>     load_entry_point('zc.zodbdgc==0.6.0', 'console_scripts',
> 'multi-zodb-check-refs')()
>   File
> "/usr/lib/python2.6/site-packages/zc.zodbdgc-0.6.0-py2.6.egg/zc/zodbdgc/__init__.py",
> line 558, in check_command
>     check(args[0], options.refdb)
>   File
> "/usr/lib/python2.6/site-packages/zc.zodbdgc-0.6.0-py2.6.egg/zc/zodbdgc/__init__.py",
> line 424, in check
>     return check_(config)
>   File
> "/usr/lib/python2.6/site-packages/zc.zodbdgc-0.6.0-py2.6.egg/zc/zodbdgc/__init__.py",
> line 511, in check_
>     print '!!!', name, u64(oid),
>   File
> "/usr/lib/python2.6/site-packages/zc.zodbdgc-0.6.0-py2.6.egg/zc/zodbdgc/__init__.py",
> line 42, in u64
>     return struct.unpack(">q", v)[0]
> struct.error: unpack requires a string argument of length 8
> """

That's odd. I wonder what q is.

> I've also had to change the following line:
>
> """
> -        name, oid = roots.pop()
> +        name, oid = roots.popitem()
> """

What makes you think you need to change this?

Jim

-- 
Jim Fulton


More information about the ZODB-Dev mailing list