shelve broken on redhat 6.1

Skip Montanaro skip at mojam.com
Fri Feb 18 17:42:52 CET 2000


    Wolf> Shelve seems to be broken in Win98 as well, although here it's the
    Wolf> keys() method that causes an error:

    Wolf> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
    Wolf> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    >>>> import shelve
    >>>> SavedGame = shelve.open("Test.psg")
    >>>> SavedGame.keys
    Wolf> <method Shelf.keys of DbfilenameShelf instance at 79b120>
    >>>> SavedGame.keys()
    Wolf> Traceback (innermost last):
    Wolf>   File "<stdin>", line 1, in ?
    Wolf>   File "C:\Program Files\Python\Lib\shelve.py", line 55, in keys
    Wolf>     return self.dict.keys()
    Wolf> bsddb.error: (22, 'Invalid argument')

Folks,

There was a problem with whichdb.py in the 1.5.2 distribution that would
cause anydbm, shelve and other packages that rely on anydbm to fail if
anydbm tried to use bsddb and the libdb implementation underlying bsddb was
version 2.x.  whichdb.py did not correctly detect version 2.x hash files.
This has been fixed in the CVS repository.

Please try updating whichdb.py before reporting a bug.  You can pick up the
latest version from

    http://www.musi-cal.com/~skip/python/Python/Lib/whichdb.py

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
"Languages that change by catering to the tastes of non-users tend not to do
so well." - Doug Landauer




More information about the Python-list mailing list