Failure deleting messages

John Wiegley jwiegley at gmail.com
Thu Feb 16 21:10:40 GMT 2012


I get the following backtrace a *lot*.  In fact, it happens so often, I'm
wondering if Offlineimap should just ignore UIDs that don't exist which it's
trying to delete?

--8<---------------cut here---------------start------------->8---
Deleting 11 messages (4640:4641,4648:4656) in MappedIMAP[Lists.WG21.Reflector]
ERROR: Syncing folder Lists/WG21/Reflector [acc: Gmail]
  4640
ERROR: ERROR in syncfolder for Gmail folder Lists/WG21/Reflector: Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/accounts.py", line 432, in syncfolder
    remotefolder.syncmessagesto(localfolder, statusfolder)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 471, in syncmessagesto
    action(dstfolder, statusfolder)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 383, in syncmessagesto_delete
    folder.deletemessages(deletelist)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/folder/UIDMaps.py", line 277, in deletemessages
    self._mb.deletemessages(self._uidlist(self.r2l, uidlist))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/folder/UIDMaps.py", line 85, in _uidlist
    return [mapping[x] for x in items]
KeyError: 4640

  4640
--8<---------------cut here---------------end--------------->8---

And I'm still seeing this several times a day.  In fact, maybe it's this
backtrace earlier on which caused the one above:

--8<---------------cut here---------------start------------->8---
Copy message 441775 (30 of 30) RemoteIMAP:[Gmail]/All Mail -> LocalIMAP
Server supports UIDPLUS but got no APPENDUID appending a message.
ERROR: Backend could not find uid for message, returned 0
Thread 'Copy message from RemoteIMAP:[Gmail]/All Mail' terminated with exception:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/threadutil.py", line 156, in run
    Thread.run(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 297, in copymessageto
    new_uid = dstfolder.savemessage(uid, message, flags, rtime)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/folder/UIDMaps.py", line 195, in savemessage
    "%s" % newluid)
ValueError: Backend could not find uid for message, returned 0


Last 5 debug messages logged for Copy message from RemoteIMAP:[Gmail]/All Mail prior to exception:
thread: Register new thread 'Copy message from RemoteIMAP:[Gmail]/All Mail' (account 'Gmail')
imap: Returned object from fetching 441773: 'Delivered-To: jwiegley at gmail.com
Received: by 10.220.201.141 with SMTP id fa13csp14243vcb;
        Thu, 16 Feb 2012 11:45:45 -0800 (PST)
Received: by ....e. the type of "thread" created by std::thread.

'
imap: savemessage: called
imap: savemessage: date: "16-Feb-2012 19:45:03 -0600", content: 'Delivered-To: jwiegley at gmail.com
Received: by 10.220.201.141 with SMTP id fa13csp14243vcb;
        Thu, 16 Feb 2012 11:45:45 -0800 (PST)
Received: .... the type of "thread" created by std::thread.

'
imap: savemessage: returning new UID 0
ERROR: Exceptions occurred during the run!
ERROR: Backend could not find uid for message, returned 0
imap(johnw): Info: Connection closed bytes=1225398/2376309
--8<---------------cut here---------------end--------------->8---

I had to sync and resync 5 times before I got a clean sync.

Thanks,
  John





More information about the OfflineIMAP-project mailing list