TypeError: 'NoneType' object is not subscriptable.

vitaly.repin at gmail.com vitaly.repin at gmail.com
Fri Apr 29 15:15:26 UTC 2011


Hello,

I use offlineimap version 6.3.3. Previously I have used 6.3.2 (with the same
server/account) and everything worked fine.

Now (with 6.3.3) I have decided to re-sync everything and started to receive
the following stdout from offlineimap:

(a lot of successfully copied messages)
Copy message 28909 IMAP[BugsSeen] -> Maildir[BugsSeen]
(The problem starts)
Copy message 32773 IMAP[Calendar] -> Maildir[Calendar]
Thread 'Copy message 22531 from Calendar' terminated with exception:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/offlineimap/threadutil.py", line
159, in run
    Thread.run(self)
  File "/usr/lib64/python2.7/threading.py", line 483, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/offlineimap/folder/Base.py", line
332, in copymessageto
    message = self.getmessage(uid)
  File "/usr/lib64/python2.7/site-packages/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 22531 from Calendar prior to
exception:
imap: Returned object from fetching 22531: ('OK', [None])

stderr shows:

WARNING:root:Using old interface name, consider using one of machineui,
blinkenlights, quiet, ttyui, basic
WARNING: ERROR attempting to copy message 22531 for account Acc:Traceback
(most recent call last):
  File "/usr/lib64/python2.7/site-packages/offlineimap/folder/Base.py", line
332, in copymessageto
    message = self.getmessage(uid)
  File "/usr/lib64/python2.7/site-packages/offlineimap/folder/IMAP.py", line
218, in getmessage
    return initialresult[1][0][1].replace("\r\n", "\n")
TypeError: 'NoneType' object is not subscriptable


Yes, the server is Exchange (2010) but pls, don't stop read here :-)

It looks like that the problem occurs with the messages from the "Calendar"
folder. Which typically contains the calendar events, not mail messages.
It might be that Exchange transforms these  messages to some special mails
which are not recognized well by offlineimap. The same happens with the
messages from the folder "Contacts" (contains my address book) and "Deleted
Items" (as it contains the mix of all the deleted entities - calendar
events,
contacts, regular mails).

I have workarounded the issue by using

folderfilter = lambda foldername: foldername not in [<list of
"special" folders>]

but I'm unsure this is the right way to fix this problem.

Can offlineimap be modified to ignore such "bad" messages? What I
especially don't like in my "solution" is inability to synchronize
"Deleted items".

If any additional data is needed, I'll be happy to provide...

Thanks in advance.
--

WBR & WBW, Vitaly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/offlineimap-project/attachments/20110429/e5544779/attachment.htm>


More information about the OfflineIMAP-project mailing list