By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,732 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,732 IT Pros & Developers. It's quick & easy.

shelve module on a gentoo/amd64 machine

P: n/a
I've run into a problem on this platform (amd64) with code that works
elsewhere, on x86, sparc, and ppc platforms. The shelve module is throwing
an error raised from the anydbm call inside it:

Python 2.3.3 (#1, Feb 17 2004, 22:00:49)
[GCC 3.3.2 20040119 (Gentoo Linux 3.3.2-r7, propolice-3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import shelve
x = shelve.open('tsetse.fly') Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/shelve.py", line 231, in open
return DbfilenameShelf(filename, flag, protocol, writeback, binary)
File "/usr/lib/python2.3/shelve.py", line 212, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback,
binary)
File "/usr/lib/python2.3/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/lib/python2.3/dbhash.py", line 16, in open
return bsddb.hashopen(file, flag, mode)
File "/usr/lib/python2.3/bsddb/__init__.py", line 192, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- DB_ENV->dbremove:
method not permitted before open')

raw calls to anydbm to open a db fail similarly:
x = anydbm.open('tsts', 'c')

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/lib/python2.3/dbhash.py", line 16, in open
return bsddb.hashopen(file, flag, mode)
File "/usr/lib/python2.3/bsddb/__init__.py", line 192, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- DB_ENV->dbremove:
method not permitted before open')

.... I'd love to know what's going on here. =) any clues deeply appreciated.
let me know if I can provide any more information.

-B
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.