shelve and writeback

Marco Bubke marco at bubke.de
Wed Jan 7 03:33:28 EST 2004


Hi

If I do 

shelve.open(filename='prim', protocol=pickle.HIGHEST_PROTOCOL,
writeback=True)

I get on some maschines(its the some python):

Traceback (most recent call last):
  File "server.py", line 45, in ?
    daemon.connectPersistent(GridManager(),'gridmanager')
  File "server.py", line 10, in __init__
    self.server = object_manager.PrimServer()
  File "/home/marco/projects/gridcomputing/ronny/object_manager.py", line 7,
in __init__
    self.values = shelve.open(filename='prim',
protocol=pickle.HIGHEST_PROTOCOL, writeback=True)
  File "/usr/local/lib/python2.3/shelve.py", line 231, in open
    return DbfilenameShelf(filename, flag, protocol, writeback, binary)
  File "/usr/local/lib/python2.3/shelve.py", line 212, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback,
binary)
  File "/usr/local/lib/python2.3/anydbm.py", line 83, in open
    return mod.open(file, flag, mode)
  File "/usr/local/lib/python2.3/dbhash.py", line 16, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/local/lib/python2.3/bsddb/__init__.py", line 186, in hashopen
    d.set_flags(hflags)
bsddb._db.DBInvalidArgError: (22, 'Invalid argument')
Exception exceptions.AttributeError: "DbfilenameShelf instance has no
attribute 'writeback'" in  ignored
closing database
Exception exceptions.AttributeError: "PrimServer instance has no attribute
'values'" in <bound method PrimServer.__del__ of <object_manager.PrimServer
instance at 0x4042096c>> ignored


is this a bug?

thx

Marco



More information about the Python-list mailing list