[ZODB-Dev] ConflictError and POSKeyError with 2.6 CVS :-(

Guido van Rossum guido@python.org
Wed, 16 Oct 2002 16:35:16 -0400


>   AS> I decided to run your fsrefs.py on our Data.fs and it came back
>   AS> with:
> 
>   AS> # /data/www/Zope.10/bin/python fsrefs.py Data.fs
>   AS> Traceback (most recent call last):
>   AS>   File "fsrefs.py", line 79, in ?
>   AS>     main(sys.argv[1])
>   AS>   File "fsrefs.py", line 68, in main
>   AS>     data, serial = fs.load(oid, "")
>   AS>   File
>   AS>   "/data/www/Zope.10/src/Zope-2.5.1-src/lib/python/ZODB/FileStorage.py",
>   AS>   line 582, in load
>   AS>     return self._load(oid, version, self._index, self._file)
>   AS>   File
>   AS>   "/data/www/Zope.10/src/Zope-2.5.1-src/lib/python/ZODB/FileStorage.py",
>   AS>   line 569, in _load
>   AS>     return _loadBack(file, oid, pnv)
>   AS>   File
>   AS>   "/data/www/Zope.10/src/Zope-2.5.1-src/lib/python/ZODB/FileStorage.py",
>   AS>   line 2137, in _loadBack
>   AS>     doid, serial, prev, tloc, vlen, plen =
>   AS>     unpack(">8s8s8s8sH8s", h)
>   AS> struct.error: unpack str size does not match format
> 
>   AS> Is that a bad thing?
> 
> It's not a good thing.  It means there's an object in your database
> that can't be loaded.

The only way I can imagine getting this error is if the position is
beyond the end of the file (or at least less than 42 bytes from the
end of the file) -- the strict module raises this error when the data
is too short (or too long, but that's impossible here).

Perhaps the index was corrupt?

--Guido van Rossum (home page: http://www.python.org/~guido/)