957: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)
- ThirdParty
- Review Board
| avalanch********@gmai***** (Google Code) (Is this you? Claim this profile.) | |
| Sept. 1, 2009 |
Hi,
We're using alpha4 with perforce, and posting diffs with post-review.py,
hitting this error:
URL: http://reviewboard/r/296/diff/
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-py2.4.egg/reviewboard/diffviewer/views.py",
line 145, in view_diff
interdiffset, highlighting, True)[0]
File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 619, in get_diff_files
large_data=True)
File
"/usr/lib/python2.4/site-packages/Djblets-0.5alpha3-py2.4.egg/djblets/util/misc.py",
line 143, in cache_memoize
data = lookup_callable()
File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 618, in <lambda>
enable_syntax_highlighting),
File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 431, in get_chunks
a[i1:i2], b[j1:j2], oldlines, newlines)
File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0alpha4-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 265, in diff_line
if oldline and newline and oldline != newline:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3:
ordinal not in range(128)
Upgraded to beta2 and still have this error.
We're having this same issue. Diff has some non-ascii characters. What can we do to address? I'm seeing this in the diff for example, not sure how these characters should be decoded: "�"
The characters are in a person's name. The file is from a third-party tool's RPM spec file (For DNS BIND.) I unfortunately don't know of a way to determine the character set used in this case.
I think the only real solution we have is to fix files with busted characters. We can't really do anything with random text without knowing the character set.
-
- NeedInfo + ThirdParty
keith, the issue you have is actually fixed in the nightlies and will be part of the upcoming RBTools release (hopefully this weekend).
i input chinese in command "post-review -p --summary 测试 --description 测试"
this error also appears
Traceback (most recent call last):
File "/usr/local/bin/post-review", line 8, in <module>
load_entry_point('RBTools==0.2rc1', 'console_scripts', 'post-review')()
File "/usr/local/lib/python2.5/site-packages/RBTools-0.2rc1-
py2.5.egg/rbtools/postreview.py", line 2774, in main
File "/usr/local/lib/python2.5/site-packages/RBTools-0.2rc1-
py2.5.egg/rbtools/postreview.py", line 2435, in tempt_fate
File "/usr/local/lib/python2.5/site-packages/RBTools-0.2rc1-
py2.5.egg/rbtools/postreview.py", line 444, in set_review_request_field
File "/usr/local/lib/python2.5/site-packages/RBTools-0.2rc1-
py2.5.egg/rbtools/postreview.py", line 622, in api_post
File "/usr/local/lib/python2.5/site-packages/RBTools-0.2rc1-
py2.5.egg/rbtools/postreview.py", line 597, in http_post
File "/usr/local/lib/python2.5/site-packages/RBTools-0.2rc1-
py2.5.egg/rbtools/postreview.py", line 656, in _encode_multipart_formdata
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb2 in position 95: ordinal not
in range(128)
will this bug fix?