Serious problem with Shelve

Tim Churches tchur at optushome.com.au
Sun Aug 17 16:27:45 EDT 2003


On Mon, 2003-08-18 at 03:04, Rami A. Kishek wrote:
> Hi - this mysterious behavior with shelve is just about to kill me.  I
> hope someone here can shed some light.  First of all, I have this piece
> of code which uses shelve to save instances of some class I define.  It
> works perfectly on an old machine (PII-400) running Python 2.2.1 under
> RedHat Linux 8.0.  When I try to run it under Python for windows ME on a
> P-4 1.4 GHz, however, it keeps crashing on reading from the shelved file
> the second time I try to access it.  The Windows machine was originally
> running python 1.5.2, so I upgraded to 2.2.3, thinking that would solve
> the problem, but it didn't!

In Python 2.2 or earlier, by default, shelve uses the Berkeley database
1.8 libraries, which we have found to be seriously broken on all
platforms we have tried them on. Upgrading to a later version of the
Berkeley libraries and using the pybsddb module fixed the mysterious,
inconsistent crashes and segfaults we were seeing with shelve (and which
were also driving us crazy). The easiest way to upgrade is to move to
Python 2.3, which includes these  later versions, but you can also
easily install them under earlier version of Python (at least under
2.2).
-- 

Tim C

PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere
or at http://members.optushome.com.au/tchur/pubkey.asc
Key fingerprint = 8C22 BF76 33BA B3B5 1D5B  EB37 7891 46A9 EAF9 93D0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20030818/d5191d9d/attachment.sig>


More information about the Python-list mailing list