gmail sync: TypeError: 'NoneType' object is unsubscriptable
julien
julien.t43 at gmail.com
Tue Aug 3 10:33:47 BST 2010
Hello,
I'm encountering a bug with offlineimap, probably linked to some
messages if I'm in some archives cases like
http://thread.gmane.org/gmane.mail.imap.offlineimap.general/494
http://thread.gmane.org/gmane.mail.imap.offlineimap.general/846
But it does not seem to be the same all time (or because offlineimap
parses folder in a non-determinist way ?)
Any help ?
Thanks a lot.
Best regards,
Julien
=> classical execution
This is OfflineIMAP 6.0.0
Python: 2.5.2 (r252:60911, Aug 12 2008, 11:14:20)
[GCC 3.3.5 (propolice)]
Platform: openbsd4
Args: ['/usr/local/bin/offlineimap', '-l',
'/var/tmp/gmail-backup.sh.log', '-d', '-1']
MainThread: OfflineIMAP 6.0.0
[...]
Copy message 26 from f/ml/folder: Copy message 26 Gmail[f/ml/folder] ->
Maildir[f.ml.folder], LocalStatus[f.ml.folder]
MainThread: Thread 'Copy message 26 from f/ml/folder' terminated with
exception:
Traceback (most recent call last):
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/threadutil.py",
lin
e 153, in run
File "/usr/local/lib/python2.5/threading.py", line 446, in run
self.__target(*self.__args, **self.__kwargs)
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/Base.py",
li
ne 277, in copymessageto
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/IMAP.py",
li
ne 167, in getmessage
TypeError: 'NoneType' object is unsubscriptable
Last 1 debug messages logged for Copy message 26 from f/ml/folder prior
to exception:
imap: Returned object from fetching 26: ('OK', [None])
=> with imap debug (new execution, crash in a different folder, not sure
if it's really the same)
[...]
Copy message 116 from [Gmail]/Messages envoy&AOk-s: DEBUG[imap]:
23:09.88 > BOPH58 UID FETCH 116 (BODY.PEEK[])
MainThread: Thread 'Copy message 116 from [Gmail]/Messages envoy&AOk-s'
terminated with exception:
Traceback (most recent call last):
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/threadutil.py",
line 153, in run File "/usr/local/lib/python2.5/threading.py", line
446, in run
File "/usr/local/lib/python2.5/threading.py", line 446, in run
self.__target(*self.__args, **self.__kwargs)
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/Base.py",
line 277, in copymessageto
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/IMAP.py",
line 164, in getmessage
File "/usr/local/lib/python2.5/imaplib.py", line 752, in uid
typ, dat = self._simple_command(name, command, *args)
File "/usr/local/lib/python2.5/imaplib.py", line 1055, in _simple_command
return self._command_complete(name, self._command(name, *args))
File "/usr/local/lib/python2.5/imaplib.py", line 885, in _command_complete
typ, data = self._get_tagged_response(tag)
File "/usr/local/lib/python2.5/imaplib.py", line 986, in
_get_tagged_response
self._get_response()
File "/usr/local/lib/python2.5/imaplib.py", line 903, in _get_response
resp = self._get_line()
File "/usr/local/lib/python2.5/imaplib.py", line 996, in _get_line
line = self.readline() File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/imaplibutil.py",
li
ne 112, in readline File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/imaplibutil.py",
li
ne 91, in readline File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/imaplibutil.py",
li
ne 82, in read File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/imaplibutil.py",
li
ne 70, in _read
sslerror: (8, 'EOF occurred in violation of protocol')
Last 1 debug messages logged for Copy message 116 from [Gmail]/Messages
envoy&AOk-s prior to exception:
imap: 23:09.88 > BOPH58 UID FETCH 116 (BODY.PEEK[])
=> with imap debug (another execution)
[...]
Folder sync gmail[f/ml/folder2]: Adding flags S to 2 messages on
LocalStatus[f.ml.folder2]
MainThread: Thread 'Folder sync gmail[f/ml/folder2]' terminated with
exception:
Traceback (most recent call last):
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/threadutil.py",
line 153, in run
File "/usr/local/lib/python2.5/threading.py", line 446, in run
self.__target(*self.__args, **self.__kwargs)
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/accounts.py",
line 251, in syncfolder
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/Base.py",
line 396, in syncmessagesto
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/Base.py",
line 373, in syncmessagesto_flags
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/Base.py",
line 179, in addmessagesflags
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/Base.py",
line 170, in addmessageflags
File
"/usr/obj/i386/offlineimap-6.0.0/fake-i386/usr/local/lib/python2.5/site-packages/offlineimap/folder/LocalStatus.py",
line 130, in getmessageflags
KeyError: 16L
Last 50 debug messages logged for Folder sync gmail[f/ml/folder2] prior
to exception:
imap: options2hash called with input: ['UID', '9', 'INTERNALDATE',
'"15-Jul-2010 15:37:16 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"15-Jul-2010 15:37:16
+0000"', 'FLAGS': '(\\Seen)', 'UID': '9'}
imap: imapsplit() called with input: UID 10 INTERNALDATE "16-Jul-2010
15:04:23 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '10', 'INTERNALDATE', '"16-Jul-2010
15:04:23 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '10', 'INTERNALDATE',
'"16-Jul-2010 15:04:23 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"16-Jul-2010 15:04:23
+0000"', 'FLAGS': '(\\Seen)', 'UID': '10'}
imap: imapsplit() called with input: UID 11 INTERNALDATE "19-Jul-2010
16:19:23 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '11', 'INTERNALDATE', '"19-Jul-2010
16:19:23 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '11', 'INTERNALDATE',
'"19-Jul-2010 16:19:23 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"19-Jul-2010 16:19:23
+0000"', 'FLAGS': '(\\Seen)', 'UID': '11'}
imap: imapsplit() called with input: UID 12 INTERNALDATE "20-Jul-2010
15:54:56 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '12', 'INTERNALDATE', '"20-Jul-2010
15:54:56 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '12', 'INTERNALDATE',
'"20-Jul-2010 15:54:56 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"20-Jul-2010 15:54:56
+0000"', 'FLAGS': '(\\Seen)', 'UID': '12'}
imap: imapsplit() called with input: UID 13 INTERNALDATE "21-Jul-2010
15:47:41 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '13', 'INTERNALDATE', '"21-Jul-2010
15:47:41 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '13', 'INTERNALDATE',
'"21-Jul-2010 15:47:41 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"21-Jul-2010 15:47:41
+0000"', 'FLAGS': '(\\Seen)', 'UID': '13'}
imap: imapsplit() called with input: UID 14 INTERNALDATE "22-Jul-2010
16:46:26 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '14', 'INTERNALDATE', '"22-Jul-2010
16:46:26 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '14', 'INTERNALDATE',
'"22-Jul-2010 16:46:26 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"22-Jul-2010 16:46:26
+0000"', 'FLAGS': '(\\Seen)', 'UID': '14'}
imap: imapsplit() called with input: UID 15 INTERNALDATE "23-Jul-2010
15:36:13 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '15', 'INTERNALDATE', '"23-Jul-2010
15:36:13 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '15', 'INTERNALDATE',
'"23-Jul-2010 15:36:13 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"23-Jul-2010 15:36:13
+0000"', 'FLAGS': '(\\Seen)', 'UID': '15'}
imap: imapsplit() called with input: UID 16 INTERNALDATE "26-Jul-2010
16:45:06 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '16', 'INTERNALDATE', '"26-Jul-2010
16:45:06 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '16', 'INTERNALDATE',
'"26-Jul-2010 16:45:06 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"26-Jul-2010 16:45:06
+0000"', 'FLAGS': '(\\Seen)', 'UID': '16'}
imap: imapsplit() called with input: UID 17 INTERNALDATE "27-Jul-2010
17:13:49 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '17', 'INTERNALDATE', '"27-Jul-2010
17:13:49 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '17', 'INTERNALDATE',
'"27-Jul-2010 17:13:49 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"27-Jul-2010 17:13:49
+0000"', 'FLAGS': '(\\Seen)', 'UID': '17'}
imap: imapsplit() called with input: UID 18 INTERNALDATE "28-Jul-2010
16:46:22 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '18', 'INTERNALDATE', '"28-Jul-2010
16:46:22 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '18', 'INTERNALDATE',
'"28-Jul-2010 16:46:22 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"28-Jul-2010 16:46:22
+0000"', 'FLAGS': '(\\Seen)', 'UID': '18'}
imap: imapsplit() called with input: UID 19 INTERNALDATE "29-Jul-2010
16:23:15 +0000" FLAGS (NonJunk \Seen)
imap: imapsplit() returning: ['UID', '19', 'INTERNALDATE', '"29-Jul-2010
16:23:15 +0000"', 'FLAGS', '(NonJunk \\Seen)']
imap: options2hash called with input: ['UID', '19', 'INTERNALDATE',
'"29-Jul-2010 16:23:15 +0000"', 'FLAGS', '(NonJunk \\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"29-Jul-2010 16:23:15
+0000"', 'FLAGS': '(NonJunk \\Seen)', 'UID': '19'}
imap: imapsplit() called with input: UID 20 INTERNALDATE "30-Jul-2010
15:56:56 +0000" FLAGS (NonJunk \Seen)
imap: imapsplit() returning: ['UID', '20', 'INTERNALDATE', '"30-Jul-2010
15:56:56 +0000"', 'FLAGS', '(NonJunk \\Seen)']
imap: options2hash called with input: ['UID', '20', 'INTERNALDATE',
'"30-Jul-2010 15:56:56 +0000"', 'FLAGS', '(NonJunk \\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"30-Jul-2010 15:56:56
+0000"', 'FLAGS': '(NonJunk \\Seen)', 'UID': '20'}
imap: imapsplit() called with input: UID 21 INTERNALDATE "02-Aug-2010
16:35:23 +0000" FLAGS (\Seen)
imap: imapsplit() returning: ['UID', '21', 'INTERNALDATE', '"02-Aug-2010
16:35:23 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash called with input: ['UID', '21', 'INTERNALDATE',
'"02-Aug-2010 16:35:23 +0000"', 'FLAGS', '(\\Seen)']
imap: options2hash returning: {'INTERNALDATE': '"02-Aug-2010 16:35:23
+0000"', 'FLAGS': '(\\Seen)', 'UID': '21'}
More information about the OfflineIMAP-project
mailing list