Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > bsddb version mysmatch between win32 and linux

Reply
Thread Tools

bsddb version mysmatch between win32 and linux

 
 
Expo
Guest
Posts: n/a
 
      02-13-2010
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
release.
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
code:

import shelve

f = shelve.open( "test.bin" )
f["test"] = "test"
f.sync()
f.close()

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

import shelve

f = shelve.open( "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/shelve.py", line 234, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.6/shelve.py", line 218, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
File "/usr/lib/python2.6/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/lib/python2.6/dbhash.py", line 19, in open
return bsddb.hashopen(file, flag, mode)
File "/usr/lib/python2.6/bsddb/__init__.py", line 361, in hashopen
d.open(file, 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 ?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM
Re: slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]:print rec Skip Montanaro Python 1 06-26-2005 08:49 PM
slicing a bsddb table, eg. for rec in bsddb["AArdvark":"zebra"]:print rec Neville C. Dempsey Python 0 06-12-2005 06:22 PM



Advertisments