I also get this error when trying to post a new diff for a review that was 
created under 1.7.x now that we have upgraded to 2.0.1. We are using 
Perforce as the repository (no encodings specified) and using rbt 0.6 to 
post the diff. I think the trick is that I'm deleting the binary file 
because a quick glance at the code seems to show that both rbt and 
ReviewBoard Server have special handling for binary files but for whatever, 
reason, the convert_to_unicode function is getting called and obviously 
failing. The new post is rejected, but if I view the original post that was 
done under 1.7, I get the stacktrace listed in this thread. The rbt output 
is as follows:
[...]

>>> Processing delete of //depot/trunk/all/cc/diags/plug_in_charger.rgb

>>> Writing "//depot/trunk/all/cc/diags/plug_in_charger.rgb#5" to 
"/var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpbtm6LW"

>>> Running: p4 print -o 
/var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpbtm6LW -q 
//depot/trunk/all/cc/diags/plug_in_charger.rgb#5

>>> Running: diff -urNp 
/var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpbtm6LW 
/var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpiX6lxg

>>> Command exited with rc 1: ['diff', '-urNp', 
'/var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpbtm6LW', 
'/var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpiX6lxg']

--- /var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpbtm6LW 2014-06-04 
14:38:08.000000000 -0400

+++ /var/folders/my/w5mdtw8j6m588rl_14wpd8frlvhpjq/T/tmpiX6lxg 2014-06-04 
14:38:08.000000000 -0400

@@ -1,72 +0,0 @@
-???????????????????????????
[...]

>>> Making HTTP GET request to 
http://reviewboard.sonos.com/reviews/api/review-requests/

>>> Making HTTP POST request to 
http://reviewboard.sonos.com/reviews/api/review-requests/

>>> Making HTTP GET request to 
http://reviewboard.sonos.com/reviews/api/review-requests/7953/diffs/

>>> Making HTTP POST request to 
http://reviewboard.sonos.com/reviews/api/review-requests/7953/diffs/

>>> 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 "/usr/local/bin/rbt", line 9, in <module>

    load_entry_point('RBTools==0.6', 'console_scripts', 'rbt')()

  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/main.py",
 
line 134, in main

    command.run_from_argv([RB_MAIN, command_name] + args)

  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/__init__.py",
 
line 422, in run_from_argv

    exit_code = self.main(*args) or 0

  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py",
 
line 769, in main

    submit_as=self.options.submit_as)

  File 
"/Library/Python/2.7/site-packages/RBTools-0.6-py2.7.egg/rbtools/commands/post.py",
 
line 545, in post_request

    raise CommandError('\n'.join(error_msg))

rbtools.commands.CommandError: Error uploading diff



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


    path: unknown encoding: 


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

 

On Monday, June 2, 2014 10:53:46 AM UTC-4, Roudaille77 wrote:
>
> Hello,
>
> I have just updated my ReviewBoard site but I can't visualize the 
> Subversion diff anymore...
> I can see :
>
> There was an error displaying this diff.
>
> Traceback (most recent call last):
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/views.py",
>  line 236, in get
>     renderer = self.create_renderer(context, *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/reviews/views.py",
>  line 1102, in create_renderer
>     *args, **kwargs)
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/views.py",
>  line 326, in create_renderer
>     self.diff_file = self._get_requested_diff_file()
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/views.py",
>  line 367, in _get_requested_diff_file
>     request=self.request)
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/diffutils.py",
>  line 373, in populate_diff_chunks
>     chunks = generator.get_chunks()
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/chunk_generator.py",
>  line 148, in get_chunks
>     large_data=True)
>   File 
> "/usr/local/lib/python2.7/dist-packages/Djblets-0.8.1-py2.7.egg/djblets/cache/backend.py",
>  line 109, in cache_memoize
>     data = lookup_callable()
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/chunk_generator.py",
>  line 147, in <lambda>
>     lambda: list(self._get_chunks_uncached()),
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/chunk_generator.py",
>  line 154, in _get_chunks_uncached
>     old = get_original_file(self.filediff, self.request, encoding_list)
>   File 
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/diffviewer/diffutils.py",
>  line 172, in get_original_file
>     encoding, data = convert_to_unicode(data, 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: 
>
> Any idea ?
>
>

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to