spaetz/offlineimap — Issue #34: 'NoneType' object is not subscriptable in IMAP.py getmessage()
Author: zooko
Created: 2012-01-27 06:28:48+00:00
State: open

This was after downloading a large number of messages successfully. This was all in my first ever run of offlineimap. This is with offlineimap 6.3.3 from Ubuntu 11.10 "Oneiric".

Copy message 400 Gmail[Crypto++] -> Maildir[Crypto++]
Copy message 33493 Gmail[INBOX] -> Maildir[INBOX]
Copy message 401 Gmail[Crypto++] -> Maildir[Crypto++]
WARNING: ERROR attempting to copy message 33493 for account gmail:Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/offlineimap/folder/Base.py", line 332, in copymessageto
message = self.getmessage(uid)
File "/usr/lib/pymodules/python2.7/offlineimap/folder/IMAP.py", line 218, in getmessage
return initialresult[1][0][1].replace("\r\n", "\n")
TypeError: 'NoneType' object is not subscriptable

Copy message 12409 Gmail[INBOX] -> Maildir[INBOX]
2: [active] *Control: .
Thread 'Copy message 33493 from INBOX' terminated with exception:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/offlineimap/threadutil.py", line 159, in run
Thread.run(self)
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/pymodules/python2.7/offlineimap/folder/Base.py", line 332, in copymessageto
message = self.getmessage(uid)
File "/usr/lib/pymodules/python2.7/offlineimap/folder/IMAP.py", line 218, in getmessage
return initialresult[1][0][1].replace("\r\n", "\n")
TypeError: 'NoneType' object is not subscriptable

Last 1 debug messages logged for Copy message 33493 from INBOX prior to exception:
imap: Returned object from fetching 33493: ('OK', [None])