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\post-review-script.py", line 8,
in <module>
    load_entry_point('RBTools==0.3.2', 'console_scripts', 'post-
review')()
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py", line 3800, in main
    submit_as=options.submit_as)
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py", line 3466, in tempt_fate
    parent_diff_content)
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py", 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\postreview.py", 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\postreview.py", line 903, in http_post
    data = urllib2.urlopen(r).read()
  File "C:\apps\python\2.7.1\lib\urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "C:\apps\python\2.7.1\lib\urllib2.py", line 392, in open
    response = self._open(req, data)
  File "C:\apps\python\2.7.1\lib\urllib2.py", line 410, in _open
    '_open', req)
  File "C:\apps\python\2.7.1\lib\urllib2.py", line 370, in _call_chain
    result = func(*args)
  File "C:\apps\python\2.7.1\lib\urllib2.py", line 1186, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\apps\python\2.7.1\lib\urllib2.py", line 1155, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "C:\apps\python\2.7.1\lib\httplib.py", line 941, in request
    self._send_request(method, url, body, headers)
  File "C:\apps\python\2.7.1\lib\httplib.py", line 975, in
_send_request
    self.endheaders(body)
  File "C:\apps\python\2.7.1\lib\httplib.py", line 937, in endheaders
    self._send_output(message_body)
  File "C:\apps\python\2.7.1\lib\httplib.py", line 795, in
_send_output
    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 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to