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?
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?