shelve, segfault and bsddb.db.DBPageNotFoundError: (-30987,


Gabriel Rossetti

Hello everyone, I get the following error with the shelve module (python
2.5.2) sometimes :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/", line 167, in __repr__
return repr(dict(self.iteritems()))
File "/usr/lib/python2.5/", line 105, in iteritems
for k in self:
File "/usr/lib/python2.5/", line 92, in __iter__
for k in self.keys():
File "/usr/lib/python2.5/", line 92, in keys
return self.dict.keys()
File "/usr/lib/python2.5/bsddb/", line 252, in keys
return _DeadlockWrap(self.db.keys)
File "/usr/lib/python2.5/bsddb/", line 62, in DeadlockWrap
return function(*_args, **_kwargs)
bsddb.db.DBPageNotFoundError: (-30987, 'DB_PAGE_NOTFOUND: Requested page
not found')

This must mean that my file is currupt, correct? If I do the following I
get a segfault :
Segmentation fault

Is this a bug? So as a workaround I must do something like this :

s ="save.dat", writeback=True)
except bsddb.db.DBPageNotFoundError, e:
s ="save.dat", writeback=True)

Any other ideas/comments? Does anyone else have this problem?



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question