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

New issue 3425 by PySVN, UTF-8 file with svn:keywords set raises exception trying to upload diff.

What version are you running?
2.0.1 and master (traceback is from master)

What's the URL of the page containing the problem?

and also posting from rbt post.

What steps will reproduce the problem?
1.  Add a SVN repo to reviewboard.
2. In that repo, commit a file with UTF-8 data ("utf8_file.txt"), and a "$Id $" line
3.  Also propset  svn:keywords "Id" utf8_file.txt
4.  Commit the file.
5.  Make a change to the file.
6. Post for review.

What is the expected output?

The review is posted.

What do you see instead?

On /r/new/, user gets no indication there was a failure. From rbt, they get
ERROR: Error uploading diff

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

path: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

Your review request still exists, but the diff is not attached.
What operating system are you using? What browser?

Please provide any additional information below.

Traceback (most recent call last):
File "reviewboard/reviewboard/webapi/resources/", line 292, in create
  File "reviewboard/reviewboard/reviews/", line 116, in create
  File "reviewboard/reviewboard/diffviewer/", line 69, in create
File "reviewboard/reviewboard/diffviewer/", line 156, in create_from_upload
File "reviewboard/reviewboard/diffviewer/", line 182, in create_from_data
    check_existence=(not parent_diff_file_contents)))
File "reviewboard/reviewboard/diffviewer/", line 300, in _process_files
File "reviewboard/reviewboard/scmtools/", line 239, in get_file_exists
    base_commit_id, request)
File "reviewboard/reviewboard/scmtools/", line 434, in _get_file_exists_uncached
    exists = self.get_scmtool().file_exists(path, revision)
  File "reviewboard/reviewboard/scmtools/", line 156, in file_exists
    self.get_file(path, revision)
File "reviewboard/reviewboard/scmtools/svn/", line 117, in get_file
    return self.client.get_file(path, revision)
File "reviewboard/reviewboard/scmtools/svn/", line 106, in get_file
    return self._do_on_path(self._get_file_data, path, revision)
File "reviewboard/reviewboard/scmtools/svn/", line 72, in _do_on_path
    return cb(normpath, normrev)
File "reviewboard/reviewboard/scmtools/svn/", line 100, in _get_file_data
    data = self.collapse_keywords(data, keywords[normpath])
File "reviewboard/reviewboard/scmtools/svn/", line 118, in collapse_keywords
    repl, data)
  File "rb_2.0/lib/python2.7/", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

        utf8-file.txt  153 bytes

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

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 post to this group, send email to
Visit this group at
For more options, visit

Reply via email to