<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;">
On Tue, 3 May 2011 04:30:51 -0700 (PDT), chris coleman wrote:<br><br>> But it didn't output any further details on the filename/line number where any bad data is. <br><br>No, because there is no bad filename/line number as the bad data is<br>coming in the form of a reply from the IMAP server.<br><br>> Must get better info on where the bad data is located, and repair these 2 username's data, ASAP.<br><br>The bad data is either a bad email or a bad reply from the IMAP server<br>that we cannot cope with. Therefore it would be good to know *what* that<br>IMAP reply is.<br> <br>> I see the actual error message gets output in the file offlineimap/accounts.py, function syncfolder, line 380:<br>> except:<br>> ui.warn("ERROR in syncfolder for %s folder %s: %s" % \<br>>
(accountname,remotefolder.getvisiblename(),sys.exc_info()[1]))<br>> <br>> These are available: localrepos, localfolder, remoterepos, remotefolder. <br>> <br>> How about we output details of the line number and filename right here in the call to ui.warn ????<br><br>6.3.3 outputs more information, giving us the full traceback (ie in<br>which line the call failed). However that won't help you here, as we<br>know that it fails in that one "long()" call. It's just triggered from a<br>specific reply from the IMAP server. And as we have changed the code<br>From 6.3.2 to 6.3.3, I think it would be worthwhile checking it out.<br><br>It's as easy as downloading and untaring<br><a href="https://github.com/nicolas33/offlineimap/tarball/v6.3.3" target="_blank">https://github.com/nicolas33/offlineimap/tarball/v6.3.3</a><br><br>going into the directory and issueing "python <a target="_blank" href="http://offlineimap.py">offlineimap.py</a>"
in<br>there. No installation required.<br><br>Sebastian<br><br>------------------------------<br><br>Sebastian,<br><br>1) I ran 6.3.3. Same results:<br><br>This is OfflineIMAP 6.3.3<br>Python: 2.5.2 (r252:60911, Jan 24 2010, 14:53:14) <br>[GCC 4.3.2]<br>Platform: linux2<br>Args: ['./offlineimap.py', '-1', '-a', '<username1>', '-l', 'output.log.2011-05-03.txt']<br>WARNING: ERROR in syncfolder for <username1> folder INBOX: Traceback (most recent call last):<br> File "/root/nicolas33-offlineimap-v633/offlineimap/accounts.py", line 313, in syncfolder<br> statusfolder.cachemessagelist()<br> File "/root/nicolas33-offlineimap-v633/offlineimap/folder/LocalStatus.py", line 82, in cachemessagelist<br> uid = long(uid)<br>ValueError: null byte in argument for long()<br><br><br>2) I looked around online for this error "null byte in argument for long()". I found this
page:<br><br>http://mail.python.org/pipermail/python-dev/2007-January/070654.html<br><br>It's possibly a bug in python since 2.6a0 Jan 2007 (and my debian lenny is running 2.5.2).<br><br><pre>><i> > > > >>> long('123\0')
</i>><i> > > > Traceback (most recent call last):
</i>><i> > > > File "<stdin>", line 1, in <module>
</i>><i> > > > ValueError: null byte in argument for long()
</i>><i> > > > >>> long('123\0', 10)
</i>><i> > > > 123L
</i>><i> > > > >>><br><br></i></pre>But there is a workaround. You put the base, 10 , as the second argument in the call to long(). <br>
<br>
What do you think... give it a try with the base in there?<br><br>Chris<br><br>
</div></div></div></body></html>