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

Shelve: got DBRunRecoveryError

P: n/a
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,"group s_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?

--
Never eat more than you can lift.

|\ | |HomePage : http://nem01.altervista.org
| \|emesis |XPN (my nr): http://xpn.altervista.org

Oct 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.