[DB-SIG] shelve and hash function

Lloyd Kvam pythonTutor at venix.com
Mon Jul 26 03:34:46 CEST 2004


I've never tried to use shelve files between systems.  shelve relies on
the underlying db module.  Your system with the error is using the bsddb
module.  Which db module is actually getting used on your source system?


I believe that you can force the use of dumbdbm to gain portability at
the expense of performance.  I presume the details are in the
documentation.


On Sun, 2004-07-25 at 21:16, roy wrote:
> I have a small app running under python 2.3, and I am trying to port this to a 
> notebook running python 2.3.1.
> 
> The trouble is that there are some data files using shelves to store objects, 
> and there seems to be a compatibility problem.
> 
> The error message I get is:-
> 
>   File "/usr/lib/python2.3/bsddb/__init__.py", line 192, in hashopen
>     d.open(file, db.DB_HASH, flags, mode)
> DBInvalidArgError: (22, 'Invalid argument -- data/foods: unsupported hash 
> version: 8')
> 
> Does this mean that an app using shelves is not really portable?
> How can I make the data files in a form that they can be opened in any version 
> of Python?
> 
> Does anyone have any experience with this kind of problem?
> 
> Thank you
>   --roy
> 
> _______________________________________________
> DB-SIG maillist  -  DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig
-- 

Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice:	603-653-8139
fax:	801-459-9582



More information about the DB-SIG mailing list