NoneType popping up in syncing some folders from Exchange
Sebastian Spaeth
Sebastian at SSpaeth.de
Sun Jan 8 11:28:34 GMT 2012
On Sat, 7 Jan 2012 20:29:47 -0500, Dale Harris <rodmur at gmail.com> wrote:
> "/Library/Python/2.7/site-packages/offlineimap/folder/IMAP.py", line 74, in
> getuidvalidity return long(uidval[0])TypeError: long() argument must be
> a string or a number, not 'NoneType'
@Piers, any obvious clue? imapobj.response('UIDVALIDITY') returned
[None] although there was a UIDVALIDITY response....
Hi Dale,
just noticed the already attached log. Perfect, thanks. Looking at the
log this strikes me as most curious though. I initially guessed this
would be Exchange's weird behavior, but looking at the log, this is what
happens for an empty folder on my IMAP server:
1) We issue typ, uidv = imapobj.response('UIDVALIDITY')
in folder/IMAP.py:l73
2a) My server returned:
* OK [UIDVALIDITY 1326020085] Ok\r\n
handler untagged_responses[OK] 0 += ["[UIDVALIDITY 1326020085] Ok"]
handler untagged_responses[UIDVALIDITY] 0 += ["1326020085"]
_get_untagged_response(UIDVALIDITY) => ['1326020085']
_untagged_response(UIDVALIDITY, ?, UIDVALIDITY) => ['1326020085']
loading Messagelist ...
2b) Your server returned
*OK [UIDVALIDITY 325009] UIDVALIDITY value\r\n
handler untagged_responses[OK] 0 += ["[UIDVALIDITY 325009] UIDVALIDITY value"]
handler untagged_responses[UIDVALIDITY] 0 += ["325009"]
_get_untagged_response(UIDVALIDITY)
_untagged_response(UIDVALIDITY, ?, UIDVALIDITY) => ['325009']
ERROR in syncfolder for WCMC folder bbsupport:
File "...offlineimap/folder/IMAP.py", line 74, in getuidvalidity
return long(uidval[0])
TypeError: long() argument must be a string or a number, not 'NoneType'
How can it be that you, for basically identical server responses, suddenly
receive a [None] value?
Is that reproducable? Does it happen for other empty folders too? What
happens if you move a message in there?
It would be great to see what is happening here.
Sebastian
-------------- 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/20120108/9d11570f/attachment-0001.sig>
More information about the OfflineIMAP-project
mailing list