Hi Chris, thanks for taking time to look at this issue.

>> If this is a new file the diff will include the BOM.
The file is not new, but in fact the BOM is being introduced as part
of the change (the config file was rewritten using C# XML helper
classes -  that introduces the BOM in the new file)

Here is a visual verification of that:

>> Thanks for making the file available so this could be confirmed.
Just to be complete, here are before and after files:

original file: 
modified file: 

>> Can you post the error, the complete traceback? Along with the version you 
>> are using.

Sure, the version of RBTools is 0.3.2. Here is a link to my modified
postreview.py (it is  the stock 0.3.2 version with this diff applied -
> http://reviews.reviewboard.org/r/2099/diff/ ) and the full traceback
is at the bottom of this post.

>> 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

I don't see any call to .encode('utf-8') - in fact nowhere in the
entire postreview.py is there any encoding from what I can see. I
probably need to go out and brush up on character encoding issues and
figure it out for myself - I was just hoping someone else might have
run into this and solved it already :)

>> It is worth your while doing a quick test with a virgin version of the 
>> latest RBTools
>> (that traceback would be the most helpful to people on the list).
The latest version is 0.3.2 from what I can see at
http://downloads.reviewboard.org/releases/RBTools/0.3/ . I agree, I
will try reinstalling, perhaps with Python 2.6.6 this time.

It is probably worth mentioning that (like in the other posting) I can
upload a TortoiseSVN-generated patch file and Review Board handles it
fine that way. Here is a link to the patch file:

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-
  File "C:\apps\python\2.7.1\lib\site-packages\rbtools-0.3.2-py2.7.egg
\rbtools\postreview.py", line 3800, in main
  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
  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
  File "C:\apps\python\2.7.1\lib\httplib.py", line 937, in endheaders
  File "C:\apps\python\2.7.1\lib\httplib.py", 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 http://www.reviewboard.org/users/
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to