[Spambayes] illegal header tanks SpamBayes
Tim Peters
tim.one at comcast.net
Fri Jul 11 23:28:24 EDT 2003
[Tim]
>> The failure is peculiar for a different reason: The msg began
>>
>> X-MS-Mail-Gibberish: Microsoft Mail Internet Headers Version
>> 2.0\r\n Received: from memex ...
>>
>> and, specifically, the letter 'X' was the first character in the
>> string, but the exception at the end was
>>
>> email.Errors.HeaderParseError: Continuation line seen before first
>> header
>>
>> Those don't jibe together. That is, X-MS-Mail-Gibberish was the
>> first header line, and there's obviously no continuation line before
>> it. We *expect* that specific exception only if the first line the
>> email pkg sees begins with whitespace.
>>
>> Since nobody else has reported this (at least not that I'm aware
>> of), it makes me wonder whether Bobby's Python or email pkg
>> installation is hosed.
[Mark Hammond]
> I have seen something similar on my machine! The specific error IIRC
> was "not a header, not a continuation", but it had a very strange
> symptom.
That's a very different exception, though <wink>.
> As you can from the log, the addin prints a complete repr() of the
> failed message string.
Indeed yes! From GetEmailPackageObject(), and it prints the repr() of
exactly the string passed to email.message_from_string(). That should be a
great diagnostic tool.
> One particular message I decided to look into - a quick scan of the
> repr'd string gave no clues. So I extracted the text into a Python
> string, and sure enough, the email package processed it just fine!
Turns out we're having better luck here: I extracted Bobby's repr(), and it
dies with the error reported, under both 2.2.3 and current 2.3 CVS. I
expect it's a bug in the email pkg, and I'll dig into it. Are you sure you
used the same email package your spamabyes installation was using? It's
changed quite a bit across releases.
More information about the Spambayes
mailing list