3789: "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 92: ordinal not in range(128)" sending an email on Windows

der.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
March 4, 2015
What version are you running?
2.0.13

What's the URL of the page containing the problem?
reviewboard/
notifications/email.py

What steps will reproduce the problem?
1. In Admin/Review E-Mails set wrong credentials
2. Create a new review
3. Set a user (who has a email address) as reviewer
4. Publish

What is the expected output? What do you see instead?
Error in reviewboard.log

What operating system are you using? What browser?
Windows 7 eng, Chrome

Please provide any additional information below.
Python Exception logged in Apache error.log:
 Traceback (most recent call last):
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]   File "C:\\Python27\\Lib\\logging\\__init__.py", line 859, in emit
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]     msg = self.format(record)
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]   File "C:\\Python27\\Lib\\logging\\__init__.py", line 732, in format
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]     return fmt.format(record)
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]   File "C:\\Python27\\lib\\site-packages\\djblets-0.8.15-py2.7.egg\\djblets\\log\\__init__.py", line 95, in format
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]     return logging.Formatter.format(self, record)
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]   File "C:\\Python27\\Lib\\logging\\__init__.py", line 471, in format
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]     record.message = record.getMessage()
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]   File "C:\\Python27\\Lib\\logging\\__init__.py", line 335, in getMessage
[Thu Feb 26 15:54:02.926841 2015] [:error] [pid 4412:tid 1020]     msg = msg % self.args
[Thu Feb 26 15:54:02.927841 2015] [:error] [pid 4412:tid 1020] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 92: ordinal not in range(128)
[Thu Feb 26 15:54:02.927841 2015] [:error] [pid 4412:tid 1020] Logged from file email.py, line 302

To fix replace line 296-302 with
logging.exception("Error sending e-mail notification with subject '%s' on "
                      "behalf of '%s' to '%s'",
                      subject.strip(),
                      from_email,
                      ','.join(list(to_field) + list(cc_field)))
david
#1 david
Fixed in release-2.0.x (41e81a7). Thanks!
  • +Fixed