#54 UnicodeEncodeError is thrown when proposing a bug
Closed: Fixed None Opened 8 years ago by mkrizek.

We had a bug report in irc saying that 500 Server Error was shown when trying to propose a bug. This is what I found in the logs:

Apr 26 12:56:04 blockerbugs01.phx2.fedoraproject.org httpd[953]: app          2016-04-26 12:56:04 ERROR   Exception on /propose_bug [POST]
                                                                 Traceback (most recent call last):
                                                                   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
                                                                     response = self.full_dispatch_request()
                                                                   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
                                                                     rv = self.handle_user_exception(e)
                                                                   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
                                                                     reraise(exc_type, exc_value, tb)
                                                                   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
                                                                     rv = self.dispatch_request()
                                                                   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
                                                                     return self.view_functions[rule.endpoint](**req.view_args)
                                                                   File "/usr/lib/python2.7/site-packages/flask_fas_openid.py", line 321, in decorated_function
                                                                     return function(*args, **kwargs)
                                                                   File "/usr/lib/python2.7/site-packages/blockerbugs/controllers/main.py", line 372, in propose_bug
                                                                     app.logger.debug('justification: %s' % str(bugform.justification.data))
                                                                 UnicodeEncodeError: 'ascii' codec can't encode character u'\u200b' in position 19: ordinal not in range(128)

The reporter said that the justification contained a content of this comment https://bugzilla.redhat.com/show_bug.cgi?id=1329342#c37 which doesn't show any non ascii characters though.

Try to reproduce the issue and propose a fix.


This ticket had assigned some Differential requests:
D835

Login to comment on this ticket.

Metadata