-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HeaderParseError #1
Comments
I tracked down the bug to an issue with how unicode subjects are encoded sometimes incorrectly by mail agents. see the discussion here: http://bugs.python.org/issue10574#msg122776 ill post a patch shortly |
I am having this problem. Any update? |
Sorry.. I don't have any updates and haven't used it in a few years.
|
Ahh too bad it's a great utility Jim Forte
|
You might try using a mail client to move the message that the script is
|
Hi,
I'm having this problem with cleanup-maildir when i run it on a large folder of mail, i get this error:
Traceback (most recent call last):
File "./cleanup-maildir", line 504, in
cleaner.clean(mode, dir, minAge)
File "./cleanup-maildir", line 405, in clean
self.log(logging.DEBUG, "Keeping #%d (fresh)" % i, msg)
File "./cleanup-maildir", line 410, in log
subj = msgObj.getSubject()
File "./cleanup-maildir", line 209, in getSubject
email.Header.decode_header(s)))
File "/usr/lib/python2.6/email/header.py", line 101, in decode_header
raise HeaderParseError
email.errors.HeaderParseError
i added some debug code, to try and get more info, but I'm no expert in python so i'm a bit lost as to how i might get more info.
i changed the code to read:
def getSubject(self):
"""get the message's subject as a unicode string"""
also note -
here is my debug output
INFO:MaildirCleaner:(Not really) Archiving #18127 to a Reference.2007: TCF: UNS: Segfault in Samba
DEBUG: subject= eBay Favourite Search: m-audio
INFO:MaildirCleaner:(Not really) Archiving #18128 to a Reference.2007: eBay Favourite Search: m-audio
DEBUG: subject= Updated barcodes showing essdale park counter stand with barcode
DEBUG: subject= =?UTF-8?B?VGhhbmsgeW91IGZvciB5b3VyIGZlZWRi?==?UTF-8?B?YWNr?=
Unexpected error: <class 'email.errors.HeaderParseError'>
email.Header.decode_header(s) s = =?UTF-8?B?VGhhbmsgeW91IGZvciB5b3VyIGZlZWRi?==?UTF-8?B?YWNr?=
see how the header is funny for the last one that seems to cause the error?
any suggestions?
Jason
The text was updated successfully, but these errors were encountered: