can't open older anydbm file

Leston Buell bulbul at ucla.edu
Mon Feb 19 01:45:48 CET 2001


Under Python 1.4 which was running on my web host's server, i created a 
database file using anydbm. Using whichdb.whichdb on it, i learn that it 
is a dbhash file, which i understand is what bsddb uses. Now my account 
has been moved to a new server, which has python 1.5.2. Now i can no 
longer open the file. When i try in an interactive session, i get this:

 >>> import anydbm
 >>> db = anydbm.open( 'address.db', 'r' )
Traceback (innermost last):
   File "<stdin>", line 1, in ?
   File "/usr/lib/python1.5/anydbm.py", line 86, in open
     return mod.open(file, flag, mode)
   File "/usr/lib/python1.5/dbhash.py", line 8, in open
     return bsddb.hashopen(file, flag, mode)
bsddb.error: (22, 'Invalid argument')

¿Is there anything i can do to open this file or to recover my data?

Thanks,

Leston




More information about the Python-list mailing list