Comment #3 on issue 2238 by unicode error in postreview

I can reproduce this with RBTools 0.3, Python 2.7 on OS X 10.7, but this only seems to manifest on OS X when the posted data includes unicode. We have multiple reports from Mac users on this issue since upgrading to ReviewBoard 1.6.14 (from 1.5), and the fix does address the problem.

A few of us spent a few hours trying to find out /why/ it fails this way and why the code change suggested fixes the problem, to no avail.

Traceback (most recent call last):
File "/usr/local/bin/post-review", line 8, in <module>
load_entry_point('RBTools==0.3.3', 'console_scripts', 'post-review')()
File "build/bdist.macosx-10.7-intel/egg/rbtools/", line 4767, in main File "build/bdist.macosx-10.7-intel/egg/rbtools/", line 4382, in tempt_fate File "build/bdist.macosx-10.7-intel/egg/rbtools/", line 882, in upload_diff File "build/bdist.macosx-10.7-intel/egg/rbtools/", line 1106, in api_post File "build/bdist.macosx-10.7-intel/egg/rbtools/", line 1088, in with_retries File "build/bdist.macosx-10.7-intel/egg/rbtools/", line 1015, in http_post File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 126, in urlopen
return, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 394, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 412, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 372, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1207, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 1168, in do_open
h.request(req.get_method(), req.get_selector(),, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 941, in request
self._send_request(method, url, body, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 975, in _send_request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 937, in endheaders
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 795, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 121630: ordinal not in range(128)

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to