process-mail.py crashing with Unicode logging errors
Bug #847485 reported by
William Grant
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Данило Шеган |
Bug Description
process-mail.py is now sometimes crashing (maybe not enough to kill the whole script, not sure) with a UnicodeDecodeError:
Traceback (most recent call last):
File "/usr/lib/
stream.write(fs % msg.encode(
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8e in position 43: ordinal not in range(128)
This was first noticed immediately after we switched it to use --log-file, but it was possibly just being redirected away before, so may not be new.
Regardless, it needs fixing as it's either an OOPS or is hiding one.
Related branches
lp:~danilo/launchpad/bug-847485
- Graham Binns (community): Approve (code)
- Diff: 0 lines
Changed in launchpad: | |
assignee: | nobody → Данило Шеган (danilo) |
Changed in launchpad: | |
status: | Triaged → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
By comparing logs for various runs, I can see that the error is not fatal. It just causes one log message to disappear. That's this one:
log.info( message[ 'Message- ID'],
signed_ message[ 'From'] ,
signed_ message[ 'Sender' ]))
'Attempting DKIM authentication of message id=%s from=%s sender=%s'
% (signed_
Looks like From/Sender may be non-ASCII bytestrings, and logging is trying to encode them to UTF-8?