Serious problem with Shelve
andymac at bullseye.apana.org.au
Tue Aug 19 14:10:57 CEST 2003
On Tue, 19 Aug 2003, Rami A. Kishek wrote:
> File "D:\PROGRAMS\PYTHON23\lib\shelve.py", line 231, in open
> return DbfilenameShelf(filename, flag, protocol, writeback, binary)
> File "D:\PROGRAMS\PYTHON23\lib\shelve.py", line 212, in __init__
> Shelf.__init__(self, anydbm.open(filename, flag), protocol,
> writeback, binary)
> File "D:\PROGRAMS\PYTHON23\lib\anydbm.py", line 80, in open
> raise error, "db type could not be determined"
> error: db type could not be determined
> Incidentally, on the other machine I mentioned (the one on which shelve
> worked perfectly with 2.2.3) shelve still works perfectly after
> upgrading to 2.3. Since that is a Linux 2 machine, I figure perhaps it
> is using a different db like gdbm or something ...
Your shelve file is in DB v1.85 format. Commenting out the lines in
which.py didn't do anything except deny the shelve module information
about what the format actually _is_.
You'll need to find/build a v1.85 compatible module to read the shelve
then write it out in a later format.
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au (pref) | Snail: PO Box 370
andymac at pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
More information about the Python-list