BUG: git-current crashing with "string index out of range"

chris coleman christocoleman at yahoo.com
Fri Mar 29 20:20:44 GMT 2013

Hi Florian,
You didn't attach your patch !
If you did attach it, the mailing list app removed the attachment, so copy/paste in the body and resend!

 From: Florin Boariu <florin.ml at rootshell.ro>
To: offlineimap-project at lists.alioth.debian.org 
Sent: Friday, March 29, 2013 4:09 PM
Subject: BUG: git-current crashing with "string index out of range"
Hi everyone,

first off thanks for the great effort in making offlineimap such a nice
piece of software :-)

Then I'd like to report a bug: offlineimap in current debian wheezy
(6.3.4) seems to crash at selected messages from my (rather large, ~7000
messages) mailbox with a strange error in folder/IMAP.py:

>  data = data[0][1].replace("\r\n", "\n")
>   IndexError: string index out of range

The problem persists with the (current?) git version, apparently
6.5.5-rc2. Simple "print"-based debugging indicates that reason for the
problem is probably a malformed message or a dropped connection of my IMAP
server. In any case, it happens reproducibly at several messages, always
at the _same_ messages, and at apparently this is because the data
returned by imapobj.uid() in IMAPFolder.getmessage() looks like:

>   [')']

instead of what the code expects:

> [('...', '...')]

The attached patch seems to... let's say "work around" :-) the problem by
checking for this specific case and resetting the data variable to a sane
value. I don't know the offlineimap internals, so I'd expect that what I'm
doing is a veeery bad and ugly fix, but it keeps things rolling for my
particular case.

If I can help you further, let me know.

I'm not on the mailing list, so I'd appreciate if people answering to this
email would be kind enough to include me in CC.

Thanks again & have a nice holiday,


OfflineIMAP-project mailing list
OfflineIMAP-project at lists.alioth.debian.org

OfflineIMAP homepage: http://software.complete.org/offlineimap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20130329/b2a31588/attachment-0003.html>

More information about the OfflineIMAP-project mailing list