4007: Invalid utf8 character error when DEBUG = True

yiping.chi
chipx86
chipx86
4516

What version are you running?

2.5

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

https://example.com/ReviewBoard/r/5202/diff/raw/

What steps will reproduce the problem?

  1. modify settings_local.py, and set DEBUG = True
  2. restart apache2
  3. create a review request by uploading a diff file

What is the expected output? What do you see instead?

A review request is expected to be created. 'Invalid utf8 character' is returned

What operating system are you using? What browser?

Please provide any additional information below.

warnings
((u'Warning', 1300L, u"Invalid utf8 character string: '803994'"),)

'INSERT INTO diffviewer_rawfilediffdata (binary_hash, binary, compression, extra_data) VALUES (\'033731afc5dd0568f332de3888e8087d42a8949c\', \'BZh91AY&SY\x809\x94
...

Python Path:
['/var/www/review/conf',
'/usr/local/lib/python2.7/dist-packages/recaptcha_client-1.0.6-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/mimeparse-0.1.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/PIL-1.1.7-py2.7-linux-x86_64.egg',
'/usr/local/lib/python2.7/dist-packages/pillowfight-0.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/distribute-0.7.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/django_haystack-2.4.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/django_evolution-0.7.5-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/Django-1.6.11.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/Djblets-0.9-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/django_multiselectfield-0.1.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages']

#1 ovidiub13

Still present in 2.5.6.1.

I'd add that the expected result would be to show the diff and the warning, not just one of them.

#2 g.iche

Hello.

Looks like i am hitting the same bug on version 2.5.7 with MySQL 5.7.16.
In version 2.5.7, the review request is created, but the default reviewer action is not performed.

#3 mpaniet

I am also having the same issue with reviewboard 2.5.7. It's kinda blocker for us.

chipx86
#4 chipx86

Review Board 2.5.8 will have a fix for this. However, if this is failing on your end, you need to make sure you have DEBUG = False in your conf/settings_local.py file.

Up for review at https://reviews.reviewboard.org/r/8636/ (Djblets) and https://reviews.reviewboard.org/r/8641/ (Review Board).

  • -New
    +PendingReview
  • +Release-2.5.x
  • -Priority:Medium
    +Priority:High
  • +chipx86
chipx86
#5 chipx86

Fixed on release-2.5.x (45c7f48469230db3ee9739d60198a955ad8758f1)

chipx86
#6 chipx86
  • -PendingReview
    +Fixed