Serious problem with Shelve

Andrew MacIntyre andymac at
Tue Aug 19 14:10:57 CEST 2003

On Tue, 19 Aug 2003, Rami A. Kishek wrote:

>   File "D:\PROGRAMS\PYTHON23\lib\", line 231, in open
>     return DbfilenameShelf(filename, flag, protocol, writeback, binary)
>   File "D:\PROGRAMS\PYTHON23\lib\", line 212, in __init__
>     Shelf.__init__(self,, flag), protocol,
> writeback, binary)
>   File "D:\PROGRAMS\PYTHON23\lib\", 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 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  (pref) | Snail: PO Box 370
        andymac at             (alt) |        Belconnen  ACT  2616
Web:               |        Australia

More information about the Python-list mailing list