Craig A wrote:
You mention you've customized postreview ...
is it possible that your new code has the Unicode assumption in
it rather than the original RBtools.

I don't think so, the relevant line of code looks like this:
return content_type, content

The trace back does not appear to show that line of code. There appears to be a concatenation of unicode and (2.x) str (bytes) type.

This may well be "fixed" by trying python 2.6 (or even 2.5) as you suggested. You'd need to debug this through to see where the Unicode string is coming from, 2.7 is the cross over version for 2.x and 3 and it does try to deal with Unicode types when possible. Of course json data is supposed to be utf8 encoded so this maybe where this is failing down.

I've left the traceback below for reference.

Traceback (most recent call last):
  File "C:\apps\python\2.7.1\scripts\", line 8,
in <module>
    load_entry_point('RBTools==0.3.2', 'console_scripts', 'post-
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\", line 3800, in main
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\", line 3466, in tempt_fate
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\", line 769, in upload_diff
    fields, files)
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\", line 982, in api_post
    return self.process_json(self.http_post(path, fields, files))
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\", line 903, in http_post
    data = urllib2.urlopen(r).read()
  File "C:\apps\python\2.7.1\lib\", line 126, in urlopen
    return, data, timeout)
  File "C:\apps\python\2.7.1\lib\", line 392, in open
    response = self._open(req, data)
  File "C:\apps\python\2.7.1\lib\", line 410, in _open
    '_open', req)
  File "C:\apps\python\2.7.1\lib\", line 370, in _call_chain
    result = func(*args)
  File "C:\apps\python\2.7.1\lib\", line 1186, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\apps\python\2.7.1\lib\", line 1155, in do_open
    h.request(req.get_method(), req.get_selector(),, headers)
  File "C:\apps\python\2.7.1\lib\", line 941, in request
    self._send_request(method, url, body, headers)
  File "C:\apps\python\2.7.1\lib\", line 975, in
  File "C:\apps\python\2.7.1\lib\", line 937, in endheaders
  File "C:\apps\python\2.7.1\lib\", line 795, in
    msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position
689: ordinal not in range(128)

Want to help the Review Board project? Donate today at
Happy user? Let us know at
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to