Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3431 by [email protected]: 'rbt post' throws BadRequestError when wrong tracking branch is specified
http://code.google.com/p/reviewboard/issues/detail?id=3431

What version are you running?
RBTools 0.6.1, RB 2.0.1

What steps will reproduce the problem?
1. git clone https://github.com/user/reviewboard
2. cd reviewboard && checkout release-2.0.x
3. rbt post --tracking-branch origin/release-1.0.x

What is the expected output? What do you see instead?
A user-friendly error should be displayed, but instead the client shows
'AttributeError: 'BadRequestError' object has no attribute 'decode''
and the server throws a LookupError.

What operating system are you using? What browser?
Windows 8.1 (client), Ubuntu 12.04 (server)

Please provide any additional information below.

Client log:
Got API Error 105 (HTTP code 400): One or more fields had errors
Error data: {u'fields': {u'path': [u'unknown encoding: ']}, 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:\Python27\Scripts\rbt-script.py", line 9, in <module>
    load_entry_point('RBTools==0.6.1', 'console_scripts', 'rbt')()
File "C:\Python27\lib\site-packages\rbtools-0.6.1-py2.7.egg\rbtools\commands\main.py", line 134, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
File "C:\Python27\lib\site-packages\rbtools-0.6.1-py2.7.egg\rbtools\commands\__init__.py", line 416, in run_from_argv
    exit_code = self.main(*args) or 0
File "C:\Python27\lib\site-packages\rbtools-0.6.1-py2.7.egg\rbtools\commands\post.py", line 784, in main
    submit_as=self.options.submit_as)
File "C:\Python27\lib\site-packages\rbtools-0.6.1-py2.7.egg\rbtools\commands\post.py", line 543, in post_request
    error_msg.append(e.decode('utf-8') + u'\n')
AttributeError: 'BadRequestError' object has no attribute 'decode'

Server log:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/webapi/resources/diff.py", line 292, in create
    request.FILES.get('parent_diff_path'))
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/reviews/forms.py", line 116, in create
    history)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/forms.py", line 69, in create
    request=self.request)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/managers.py", line 156, in create_from_upload
    save=save)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/managers.py", line 173, in create_from_data
    diff_file_contents, repository.get_encoding_list())
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 50, in convert_to_unicode
    return e, six.text_type(s, e)
LookupError: unknown encoding:




--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to