Shelve: got DBRunRecoveryError

N

Nemesis

Hi all, I'm having a problem with a shelve.
I got (almost randomly) this error:

Traceback (most recent call last):
File "xpn.py", line 1082, in view_article
self.remove_from_unreads(article_to_read)
File "xpn.py", line 860, in remove_from_unreads
articles[msgid]=article
File "/usr/local/lib/python2.4/shelve.py", line 130, in __setitem__
self.dict[key] = f.getvalue()
File "/usr/local/lib/python2.4/bsddb/__init__.py", line 218, in
__setitem__
self.db[key] = value
DBRunRecoveryError: (-30978, 'DB_RUNRECOVERY: Fatal error, run database
recovery -- PANIC: Invalid argument')

The error happens whe I try to replace an element inside the shelve with
this function:

def remove_from_unreads(self,article):
#remove article from unreads
msgid=article.msgid
articles=shelve.open(os.path.join(self.wdir,"groups_info/",self.group_to_thread,self.group_to_thread))
xpn_article=articles.get(msgid,None)
if xpn_article!=None:
article.is_read=True
articles[msgid]=article
articles.close()

What could be the 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

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top