<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>&gt; But it didn't output any further details on the filename/line number where any bad data is.&nbsp; <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>&gt; 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>&gt; I see the actual error message gets output in the file offlineimap/accounts.py, function syncfolder, line 380:<br>&gt; &nbsp;&nbsp;&nbsp; except:<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ui.warn("ERROR in syncfolder for %s folder %s: %s" % \<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 (accountname,remotefolder.getvisiblename(),sys.exc_info()[1]))<br>&gt; <br>&gt; These are available: localrepos, localfolder, remoterepos, remotefolder.&nbsp; <br>&gt; <br>&gt; 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.&nbsp; 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', '&lt;username1&gt;', '-l', 'output.log.2011-05-03.txt']<br>WARNING: ERROR in syncfolder for &lt;username1&gt; folder INBOX: Traceback (most recent call last):<br>&nbsp; File "/root/nicolas33-offlineimap-v633/offlineimap/accounts.py", line 313, in syncfolder<br>&nbsp;&nbsp;&nbsp; statusfolder.cachemessagelist()<br>&nbsp; File "/root/nicolas33-offlineimap-v633/offlineimap/folder/LocalStatus.py", line 82, in cachemessagelist<br>&nbsp;&nbsp;&nbsp; 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>&gt;<i> &gt; &gt; &gt; &gt;&gt;&gt; long('123\0')
</i>&gt;<i> &gt; &gt; &gt; Traceback (most recent call last):
</i>&gt;<i> &gt; &gt; &gt;   File "&lt;stdin&gt;", line 1, in &lt;module&gt;
</i>&gt;<i> &gt; &gt; &gt; ValueError: null byte in argument for long()
</i>&gt;<i> &gt; &gt; &gt; &gt;&gt;&gt; long('123\0', 10)
</i>&gt;<i> &gt; &gt; &gt; 123L
</i>&gt;<i> &gt; &gt; &gt; &gt;&gt;&gt;<br><br></i></pre>But there is a workaround. You put the base, 10 , as the second argument in the call to long().&nbsp; <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>