Bystroushaak's blog / Paperclips / Útržky / Fuck Shelve
🗒

Fuck Shelve

Each and every time I try to use Shelve to actually store anything, I end up with following error:

Traceback (most recent call last):
  File "/home/bystrousak/scripty/data_loger/configuration.py", line 44, in load
    self.from_dict(db.get("data", {}))
  File "/usr/lib/python2.7/shelve.py", line 113, in get
    if key in self.dict:
  File "/usr/lib/python2.7/_abcoll.py", line 388, in __contains__
    self[key]
  File "/usr/lib/python2.7/bsddb/__init__.py", line 270, in __getitem__
    return _DeadlockWrap(lambda: self.db[key])  # self.db[key]
  File "/usr/lib/python2.7/bsddb/dbutils.py", line 68, in DeadlockWrap
    return function(*_args, **_kwargs)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 270, in <lambda>
    return _DeadlockWrap(lambda: self.db[key])  # self.db[key]
bsddb.db.DBPageNotFoundError: (-30986, 'BDB0075 DB_PAGE_NOTFOUND: Requested page not found')

It has really wonderful ability to fuck itself up, randomly.

I use sqlitedict instead without any problems.

Become a Patron