'NoneType' object is not subscriptable
Sebastian at SSpaeth.de
Thu Jan 19 11:10:51 GMT 2012
On Tue, 17 Jan 2012 14:58:06 +0000, Chris Dennis wrote:
> And then I did a bit more hacking, and added some more diagnostics to
> imaplib2.py, and noticed that for some folders the UIDVALIDITY call
> succeeds once, but returns None the second time. So I made this change
> to folder/IMAP.py:
That - combined with Nicolas analysis - was very helpful indeed and
pointed me towards the root cause of the issue. Thanks.
Just pushed 9453e1d9551e56bc7c8d73c19a29e609de873f15 to "next" fixing
this and also cherry-picked the hotfix to master. So the git checkout
should work fine now and it will be fixed in the next release.
The relevant piece is:
IMAPs implementation of get_uidvalidity was removing the UIDVALIDITY
result from the imaplib2 result stack, so subsequent calls would return
"None". As various functions can invoke this, this led to some errors
that we avoid by caching the current UIDVALIDITY value in the Folder
There is a slew of more minor UIDvalidity code cleanup (mostly renaming
and code documentation) patches on the next branch. I tested
IMAP<->Maildir and IMAP<->IMAP and they work fine for me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project