bsddb version mysmatch between win32 and linux



Hi guys,

I found an incompatibility in the bsddb library shipped with Python
which is a different version between the win32 release and the linux
This happend using Python 2.6.2 on win32 and OpenSuse 11.2.
To reproduce this problem, create a bsddb file under win32 with this

import shelve

f = "test.bin" )
f["test"] = "test"

copy test.bin in the OpenSuse system and try to open it:

import shelve

f = "test.bin" )
print f["test"]

and you get this traceback:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/", line 234, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.6/", line 218, in __init__
Shelf.__init__(self,, flag), protocol, writeback)
File "/usr/lib/python2.6/", line 83, in open
return, flag, mode)
File "/usr/lib/python2.6/", line 19, in open
return bsddb.hashopen(file, flag, mode)
File "/usr/lib/python2.6/bsddb/", line 361, in hashopen, db.DB_HASH, flags, mode)
bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- ./test.bin:
unsupported hash version: 9')

I don't know yet if the problem is related to OpenSuse or to the
Python linux distribution.

How I can resolve this ?


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question