Why does database.keys() method fail in shelve?

TuxTrax TuxTrax at fortress.tuxnet.net
Fri Nov 1 05:32:46 EST 2002


>>> database = shelve.open("HH.database", "r")
>>> database.keys()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.0/shelve.py", line 55, in keys
    return self.dict.keys()
bsddb.error: (22, 'Invalid argument')

This is the error which I recieve when I try to list keys in the following 
*large* shelve file:

-rw-r--r--    1 mat      mat      92045312 Nov  1 02:19 HH.database

That seems to otherwise be functioning normally.

Any ideas why the keys method consistently refuses to work? Is there
an upper limit on the number of keys it can handle? The file Has like, 
25,000+ keys. If so, is there another method to use?

Cheers,

Mathew

-- 
My Family is Microsoft Free. Running Mandrake Linux 8.0 kernel 2.4.3-20
I use quality open source software alternatives on my PC.

Yes, I am a Penguin cult high priest. Flipper readings upon request.

ROT13 this email address to mail me:
bar jbeq abg guerr - uvtu qrfreg zna, ng lnubb qbg pbz




More information about the Python-list mailing list