Hi, The utf8 error will be fixed in 2.5.8, which will be coming out soon. In the meantime, you should set DEBUG=False in settings.py (there's no reason to turn on DEBUG for production installs).
Your second example, which ran when DEBUG was turned off, failed because there are no groups named "user". Perhaps you meant --target-people? -David On Mon, Feb 6, 2017 at 7:20 AM <[email protected]> wrote: > hello! > > I met a problem about "error: invalid utf8 string" when I install a new > server with reviewboard , when I upload a diff file to create a new review > request,it aways prompt that error to me! I don't know how to solve it and > I have been blocked by this error for days, I need help! please! > > > my system info is : > > system:ubuntu16.04 Server > python:2.7.12 > mysql:Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper > apache:Apache/2.4.18 (Ubuntu) > ReviewBoard:2.5.7 > svn:version 1.9.3 (r1718519) > > > when I use this command : > > rbt post -p -d --server="http://172.17.226.171" --username='summer' > --password='******' --submit-as="summer" --summary="20170123-1" > --target-groups="user" --description="test" --repository-url=" > http://172.17.226.129/SVN/TestRepo" 33 >> /tmp/svn-post-commit.log > > it shows: > > >>> RBTools 0.7.6 > > >>> Python 2.7.6 (default, Jun 22 2015, 17:58:13) > > [GCC 4.8.2] > > >>> Running on Linux-3.13.0-32-generic-x86_64-with-Ubuntu-14.04-trusty > > >>> Home = /var/www > > >>> Current directory = /var/www/.ssh > > >>> Checking for a Subversion repository... > > >>> Running: svn --non-interactive info http://172.17.226.129/SVN/TestRepo > > >>> Running: diff --version > > >>> Running: svn --non-interactive --version -q > > >>> repository info: Path: http://172.17.226.129/SVN/TestRepo, Base path: > /, Supports changesets: False > > >>> Making HTTP GET request to http://172.17.226.171/api/ > > >>> Making HTTP GET request to > http://172.17.226.171/api/repositories/?tool=Subversion > > >>> Added cache entry for HTTP GET request to > http://172.17.226.171/api/repositories/?tool=Subversion > > >>> Running: svn --non-interactive log --xml -r 33 -l 1 > http://172.17.226.129/SVN/TestRepo > > >>> Running: svn --non-interactive info http://172.17.226.129/SVN/TestRepo > > >>> Running: diff --version > > >>> Running: svn --non-interactive --version -q > > >>> repository info: Path: http://172.17.226.129/SVN/TestRepo, Base path: > /, Supports changesets: False > > >>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry > http://172.17.226.129/SVN/TestRepo/@32 > http://172.17.226.129/SVN/TestRepo/@33 > > >>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry > http://172.17.226.129/SVN/TestRepo/@32 > http://172.17.226.129/SVN/TestRepo/@33 --no-diff-deleted > > >>> Making HTTP GET request to http://172.17.226.171/api/validation/diffs/ > > >>> Added cache entry for HTTP GET request to > http://172.17.226.171/api/validation/diffs/ > > >>> Making HTTP POST request to > http://172.17.226.171/api/validation/diffs/ > > >>> Got API Error 224 (HTTP code 400): Unexpected error when validating > the diff: Invalid utf8 character string: 'A33200' > > >>> Error data: {u'stat': u'fail', u'err': {u'msg': u"Unexpected error > when validating the diff: Invalid utf8 character string: 'A33200'", > u'code': 224}} > > Traceback (most recent call last): > > File "/usr/local/bin/rbt", line 9, in <module> > > load_entry_point('RBTools==0.7.6', 'console_scripts', 'rbt')() > > File > "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/main.py", > line 133, in main > > command.run_from_argv([RB_MAIN, command_name] + args) > > File > "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/__init__.py", > line 629, in run_from_argv > > exit_code = self.main(*args) or 0 > > File > "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/post.py", > line 756, in main > > (msg_prefix, e)) > > rbtools.commands.CommandError: Error validating diff > > > > Unexpected error when validating the diff: Invalid utf8 character string: > 'A33200' (HTTP 400, API Error 224) > > > > > > then I set debug=False in the setting.py , rerun that command,it shows: > > www-data@ubuntu-empty:~/TestRepo$ rbt post -p -d --server=" > http://172.17.226.171" --username='summer' --password='******' > --submit-as="summer" --summary="20170123-1" --target-groups="user" > --description="test" --repository-url="http://172.17.226.129/SVN/TestRepo" > 33 >> /tmp/svn-post-commit.log > >>> RBTools 0.7.6 > >>> Python 2.7.6 (default, Jun 22 2015, 17:58:13) > [GCC 4.8.2] > >>> Running on Linux-3.13.0-32-generic-x86_64-with-Ubuntu-14.04-trusty > >>> Home = /var/www > >>> Current directory = /var/www/TestRepo > >>> Checking for a Subversion repository... > >>> Running: svn --non-interactive info http://172.17.226.129/SVN/TestRepo > >>> Running: diff --version > >>> Running: svn --non-interactive --version -q > >>> repository info: Path: http://172.17.226.129/SVN/TestRepo, Base path: > /, Supports changesets: False > >>> Making HTTP GET request to http://172.17.226.171/api/ > >>> Making HTTP GET request to > http://172.17.226.171/api/repositories/?tool=Subversion > >>> Cached response for HTTP GET > http://172.17.226.171/api/repositories/?tool=Subversion expired and was > modified > >>> Running: svn --non-interactive log --xml -r 33 -l 1 > http://172.17.226.129/SVN/TestRepo > >>> Running: svn --non-interactive info http://172.17.226.129/SVN/TestRepo > >>> Running: diff --version > >>> Running: svn --non-interactive --version -q > >>> repository info: Path: http://172.17.226.129/SVN/TestRepo, Base path: > /, Supports changesets: False > >>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry > http://172.17.226.129/SVN/TestRepo/@32 > http://172.17.226.129/SVN/TestRepo/@33 > >>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry > http://172.17.226.129/SVN/TestRepo/@32 > http://172.17.226.129/SVN/TestRepo/@33 --no-diff-deleted > >>> Making HTTP GET request to http://172.17.226.171/api/validation/diffs/ > >>> Cached response for HTTP GET > http://172.17.226.171/api/validation/diffs/ expired and was modified > >>> Making HTTP POST request to > http://172.17.226.171/api/validation/diffs/ > >>> Making HTTP GET request to > http://172.17.226.171/api/review-requests/?only-links=create&only-fields= > >>> Added cache entry for HTTP GET request to > http://172.17.226.171/api/review-requests/?only-links=create&only-fields= > >>> Making HTTP POST request to http://172.17.226.171/api/review-requests/ > >>> Making HTTP GET request to > http://172.17.226.171/api/review-requests/3/diffs/?only-fields= > >>> Added cache entry for HTTP GET request to > http://172.17.226.171/api/review-requests/3/diffs/?only-fields= > >>> Making HTTP POST request to > http://172.17.226.171/api/review-requests/3/diffs/ > >>> Making HTTP GET request to > http://172.17.226.171/api/review-requests/3/draft/?only-fields=commit_id > >>> Added cache entry for HTTP GET request to > http://172.17.226.171/api/review-requests/3/draft/?only-fields=commit_id > >>> Making HTTP PUT request to > http://172.17.226.171/api/review-requests/3/draft/ > >>> Got API Error 105 (HTTP code 400): One or more fields had errors > >>> Error data: {u'fields': {u'target_groups': [u'user']}, u'stat': > u'fail', u'draft': {u'commit_id': None, u'bugs_closed': [], > u'last_updated': u'2017-02-06T07:13:24Z', u'description': u'test', > u'target_people': [], u'changedescription': u'', u'depends_on': [], > u'description_text_type': u'plain', u'target_groups': [], > u'testing_done_text_type': u'plain', u'links': {u'self': {u'href': u' > http://172.17.226.171/api/review-requests/3/draft/', u'method': u'GET'}, > u'draft_diffs': {u'href': u' > http://172.17.226.171/api/review-requests/3/draft/diffs/', u'method': > u'GET'}, u'update': {u'href': u' > http://172.17.226.171/api/review-requests/3/draft/', u'method': u'PUT'}, > u'draft_screenshots': {u'href': u' > http://172.17.226.171/api/review-requests/3/draft/screenshots/', > u'method': u'GET'}, u'draft_file_attachments': {u'href': u' > http://172.17.226.171/api/review-requests/3/draft/file-attachments/', > u'method': u'GET'}, u'review_request': {u'href': u' > http://172.17.226.171/api/review-requests/3/', u'method': u'GET', > u'title': u'(no summary)'}, u'delete': {u'href': u' > http://172.17.226.171/api/review-requests/3/draft/', u'method': > u'DELETE'}}, u'summary': u'20170123-1', u'public': False, u'testing_done': > u'', u'branch': u'', u'text_type': None, u'extra_data': {}, > u'changedescription_text_type': u'plain', u'id': 7}, 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.7.6', 'console_scripts', 'rbt')() > File > "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/main.py", > line 133, in main > command.run_from_argv([RB_MAIN, command_name] + args) > File > "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/__init__.py", > line 629, in run_from_argv > exit_code = self.main(*args) or 0 > File > "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/post.py", > line 805, in main > base_dir=base_dir) > File > "/usr/local/lib/python2.7/dist-packages/RBTools-0.7.6-py2.7.egg/rbtools/commands/post.py", > line 567, in post_request > % (e, review_request.absolute_url)) > rbtools.commands.CommandError: Error updating review request draft: One or > more fields had errors (HTTP 400, API Error 105) > > target_groups: user > > Your review request still exists, but the diff is not attached. > > http://172.17.226.171/r/3/ > > > > > when I upload a patch file which created by tortoiseSVN through the > ReviewBoard Web page ,it prompt : > > Unexpected error when validating the diff: Invalid utf8 character string: > '843C2A' > Line undefined: undefined > > and the admin page ->server log shows: > - Unexpected error when validating diff. > Traceback (most recent call last): > File > "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/resources/validate_diff.py", > line 156, in create > save=False) > File > "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/managers.py", > line 432, in create_from_upload > save=save) > File > "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/managers.py", > line 545, in create_from_data > status=status) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", > line 413, in __init__ > setattr(self, prop, kwargs.pop(prop)) > File > "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/models.py", > line 225, in _set_diff > RawFileDiffData.objects.get_or_create_from_data(diff) > File > "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/managers.py", > line 360, in get_or_create_from_data > 'compression': compression, > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line > 154, in get_or_create > return self.get_queryset().get_or_create(**kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", > line 383, in get_or_create > obj.save(force_insert=True, using=self.db) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", > line 545, in save > force_update=force_update, update_fields=update_fields) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", > line 573, in save_base > updated = self._save_table(raw, cls, force_insert, force_update, > using, update_fields) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", > line 654, in _save_table > result = self._do_insert(cls._base_manager, using, fields, update_pk, > raw) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", > line 687, in _do_insert > using=using, raw=raw) > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line > 232, in _insert > return insert_query(self.model, objs, fields, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", > line 1514, in insert_query > return query.get_compiler(using=using).execute_sql(return_id) > File > "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", > line 903, in execute_sql > cursor.execute(sql, params) > File "/usr/local/lib/python2.7/dist-packages/djblets/log/middleware.py", > line 32, in execute > return self.cursor.execute(sql, params) > File > "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", > line 124, in execute > return self.cursor.execute(query, args) > File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 228, in > execute > if not self._defer_warnings: self._warning_check() > File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 127, in > _warning_check > warn(w[-1], self.Warning, 3) > Warning: Invalid utf8 character string: '843C2A' > > -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://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 [email protected]. For more options, visit https://groups.google.com/d/optout.
