'NoneType' object is not subscriptable

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Jan 16 21:59:06 GMT 2012


On Tue, 10 Jan 2012 18:33:34 +0100, Nicolas Sebrecht <nicolas.s-dev at laposte.net> wrote:
>   File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 78, in getuidvalidity
>     return long(uidval[-1])
> TypeError: 'NoneType' object is not subscriptable

Hi Nicolas,

is that reproducible? I cannot get that error somehow. And I had already
included a "safety assert" to catch that a line earlier, which *should*
have caught that.

If reproducible, can you add a "print uidval" before line 78 in
folder/IMAP.py to see what the value of uidval really is? I wonder what
has changed that we are seeing this.

folder/IMAP.py:l78
            assert uidval != [None], "response('UIDVALIDITY') returned [None]!"
+           print uidval
            return long(uidval[-1])

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20120116/3ac00999/attachment.sig>


More information about the OfflineIMAP-project mailing list