This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python 2.2 shelve
Type: Stage:
Components: Extension Modules Versions: Python 2.2
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, loewis, tarski9
Priority: normal Keywords:

Created on 2002-01-16 09:48 by tarski9, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (3)
msg8788 - (view) Author: tarski (tarski9) Date: 2002-01-16 09:48
I've created a shelve 'db-test' under Red Hat Linux 7.1
and Python 2.1.1. When I want to open this shelve under
Win2k with Python 2.1.1 or Python 2.2, following occurs.


>>> db = shelve.open("C:\db-test")
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in ?
    db = shelve.open("C:\db-test")
  File "C:\PROGRAMS\PYTHON22\lib\shelve.py", line 158,
in open
    return DbfilenameShelf(filename, flag)
  File "C:\PROGRAMS\PYTHON22\lib\shelve.py", line 148,
in __init__
    Shelf.__init__(self, anydbm.open(filename, flag))
  File "C:\PROGRAMS\PYTHON22\lib\anydbm.py", line 86,
in open
    return mod.open(file, flag, mode)
  File "C:\PROGRAMS\PYTHON22\lib\dbhash.py", line 16,
in open
    return bsddb.hashopen(file, flag, mode)
error: (22, 'Invalid argument')


Is there a bug in the bsddb.lib und Windows? Is there a
solution to create shelves under Linux and to use them
under Windows?

Thanks

tarski
msg8789 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-01-16 12:07
Logged In: YES 
user_id=21627

Unfortunately, there are different versions of BSDDB in
circulation, which use different file formats.

On Linux, please do

ldd <path-to-python-lib>/lib-dynload/bsddbmodule.so

to find out what version you have linked with. Also, please
invoke file(1) to find out the file version. I can't tell
off-hand what version the standard Windows installation is
build with, but knowing what you use on Linux will get us
closer.
msg8790 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-02-06 18:33
Logged In: YES 
user_id=11375

Marking as closed; it seems unlikely the original reporter will respond after a year.
History
Date User Action Args
2022-04-10 16:04:53adminsetgithub: 35925
2002-01-16 09:48:03tarski9create