3571: some rbtools error in windows 7 64 chinese system.

feix*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 29, 2014
What version are you running?
ReviewBoard 2.0.7 / RBTools 0.6.2
Server:Centos
Client:windows 7 64 chinese system

What's the URL of the page containing the problem?
Not applicable as it's a RBTools issue.
------------------------------------

client command:
rbt post -d --diff-filename E:\我的svn\我的地址\我的diff文件.txt.patch

some chinese character in diff file path.

------------------------------------

What steps will reproduce the problem?
1. post a new diff file to reviweboard,and get some errors
2. See RBTools log

------------------------------------
>>> Making HTTP POST request to http://192.168.100.8/api/review-requests/45/diff
s/
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u"'gb2312' codec can't encode character u
'\\ufffd' in position 42: illegal multibyte sequence"]}, u'stat': u'fail', u'err
': {u'msg': u'One or more fields had errors', u'code': 105}}
Traceback (most recent call last):
  File "C:\Python26\Scripts\rbt-script.py", line 9, in <module>
    load_entry_point('RBTools==0.6.2', 'console_scripts', 'rbt')()
  File "C:\Python26\lib\site-packages\rbtools-0.6.2-py2.6.egg\rbtools\commands\m
ain.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "C:\Python26\lib\site-packages\rbtools-0.6.2-py2.6.egg\rbtools\commands\_
_init__.py", line 416, in run_from_argv
    exit_code = self.main(*args) or 0
  File "C:\Python26\lib\site-packages\rbtools-0.6.2-py2.6.egg\rbtools\commands\p
ost.py", line 783, in main
    submit_as=self.options.submit_as)
  File "C:\Python26\lib\site-packages\rbtools-0.6.2-py2.6.egg\rbtools\commands\p
ost.py", line 550, in post_request
    raise CommandError(u'\n'.join(error_msg))
rbtools.commands.CommandError: Error uploading diff

One or more fields had errors (HTTP 400, API Error 105)

    path: 'gb2312' codec can't encode character u'\ufffd' in position 42: illega
l multibyte sequence

Your review request still exists, but the diff is not attached.

http://192.168.100.8/r/45/
------------------------------------
Operating system: Windows 7-64 chinese system
Browsers: Internet Explorer 8 / Google Chrome
python version: python2.6.6 utf-8
------------------------------------

Hello,

When i post a new diff to reviewboard server, i get some error. Because chinese character is in diff file path.
How can i slove this problem.

Thanks and Best regards.
david
#1 david
Can you look in the review board server log (or have your administrator do so) and find the traceback there?
  • +NeedInfo
#2 feix*****@gmai***** (Google Code) (Is this you? Claim this profile.)
thanks for reply.

The server log is the same as client log.

When i check Review Board, i found that gb2312 is in ADVANCED SETTINGS's Encoding.
and i delete it in Encoding, the error is not appear again.

I guess that is the reson.
david
#3 david
The server log may have the same "invalid multibyte sequence" error but the traceback will be different. We'd like to have that traceback so we can make it not fail.
#4 feix*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Yes, i want to give some help, but i can't reproduce the problem...
david
#5 david
In that case, there's nothing we can do.
  • -NeedInfo
    +UnableToReproduce