dbhash/bsddb problem, old bsddb version?

Leston Buell bulbul at ucla.edu
Tue Nov 26 22:02:34 EST 2002


Hi. I have this nifty web-based address book program that i wrote a 
couple of years ago in Python. It is hosted on a web host, so i have no 
control over the way Python or other programs are installed. My web 
host, which is running a very old version of Red Hat Linux, probably 
5.1, recently upgraded from Python 1.5 to 2.2. Now my program doesn't 
work. The program uses the anydbm module to store its data, in a file 
named "address.db". When i do whichdb.whichdb("address.db"), i'm told 
that this file is in dbhash format. However, when i try to open it using 
dbhash (on my home machine), i get the following:

 >>> dbhash.open( 'address.db', 'r' )

Traceback (most recent call last):
    File "<stdin>", line 1, in ? File
    "/usr/lib/python2.2/dbhash.py", line 16,
    in open return bsddb.hashopen(file, flag, mode)
    bsddb.error: (-30990, 'Unknown error 4294936306')

I recall that when i first wrote this program a few years ago there was 
some sort of change in database format that required me to do something 
to make this file readable again (a discrepency between bsddb on my web 
host and a newer version on my home machine), but i don't remember what. 
My web host's new installation of Python doesn't even have the bsddb 
module installed (which is why anydbm.open fails). So, i've written a 
little program to convert my data file to gdbm (on my home machine). 
However, on my own machine i can't open the file using dbhash, as i just 
described. Can someone please tell me what i need to do to get at my 
data again?

Oh, and another piece of advice i would appreciate. As i mentioned, i've 
already written a little program to convert my dbhash file to gdbm 
format. Is there any reason i should be using dbm instead of gdbm?

Thanks.

Leston
bulbul at ucla.edu




More information about the Python-list mailing list