2377: HTTP 500 error in the tooltip on hover of a user name with accented characters in name

peti****@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
Jan. 22, 2012
2309
What version are you running?
1.6

What's the URL of the page containing the problem?
https://reviewboard.ourdomain.com/r/1649/

What steps will reproduce the problem?
1. In the Updates section after the description of the review request, let your mouse cursor over the name of someone who updated the request. If the name contains accented characters such as "é" or "ç", an HTTP 500 error is displayed in the tooltip.


What is the expected output? What do you see instead?
Expected: The user information.
Actually: An HTTP 500 error.

What operating system are you using? What browser?
Windows 7 Enterprise Service Pack 1 x64
Google Chrome v15.0.874.106

Please provide any additional information below.
Here is some parts of the HTTP 500 error:

----------------------------------------
Environment:


Request Method: GET
Request URL: https://reviewboard.corp.coveo.com/users/aturgeon/infobox/

Django Version: 1.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.markup',
 'django.contrib.sites',
 'django.contrib.sessions',
 'djblets.datagrid',
 'djblets.feedview',
 'djblets.gravatars',
 'djblets.log',
 'djblets.siteconfig',
 'djblets.util',
 'djblets.webapi',
 'reviewboard.accounts',
 'reviewboard.admin',
 'reviewboard.attachments',
 'reviewboard.changedescs',
 'reviewboard.diffviewer',
 'reviewboard.notifications',
 'reviewboard.reports',
 'reviewboard.reviews',
 'reviewboard.scmtools',
 'reviewboard.site',
 'reviewboard.webapi',
 'django_evolution']
Installed Middleware:
('django.middleware.gzip.GZipMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.http.ConditionalGetMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'djblets.siteconfig.middleware.SettingsMiddleware',
 'reviewboard.admin.middleware.LoadSettingsMiddleware',
 'djblets.log.middleware.LoggingMiddleware',
 'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware',
 'reviewboard.admin.middleware.X509AuthMiddleware',
 'reviewboard.site.middleware.LocalSiteMiddleware')


Traceback:
File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6-py2.6.egg/reviewboard/accounts/decorators.py" in _check
  19.             return login_required(view_func)(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.10-py2.6.egg/djblets/auth/util.py" in _checklogin
  46.             return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.6-py2.6.egg/reviewboard/reviews/views.py" in user_infobox
  1166.     set_etag(response, etag)
File "/usr/local/lib/python2.6/dist-packages/Djblets-0.6.10-py2.6.egg/djblets/util/http.py" in set_etag
  68.     response['ETag'] = etag
File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/http/__init__.py" in __setitem__
  528.         header, value = self._convert_to_ascii(header, value)
File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/http/__init__.py" in _convert_to_ascii
  517.                     value = value.encode('us-ascii')

Exception Type: UnicodeEncodeError at /users/aturgeon/infobox/
Exception Value: 'ascii' codec can't encode character u'\xe9' in position 2: ordinal not in range(128), HTTP response headers must be in US-ASCII format

----------------------------------------

/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/http/__init__.py in _convert_to_ascii
            + '\n\n' + self.content
    def _convert_to_ascii(self, *values):
        """Converts all values to ascii strings."""
        for value in values:
            if isinstance(value, unicode):
                try:
                    value = value.encode('us-ascii') ...
                except UnicodeError, e:
                    e.reason += ', HTTP response headers must be in US-ASCII format'
                    raise
            else:
                value = str(value)
            if '\n' in value or '\r' in value:
▶ Local vars
Variable	Value
values	
('ETag',
 u'Am\xe9lie:Turgeron:aturgeon@coveo.com:2011-11-09 09:48:26:1315518092:True')
self	
<django.http.HttpResponse object at 0x7fa062618b10>
e	
UnicodeEncodeError('ascii', u'Am\xe9lie:Turgeron:aturgeon@coveo.com:2011-11-09 09:48:26:1315518092:True', 2, 3, 'ordinal not in range(128)')
value	
u'Am\xe9lie:Turgeron:aturgeon@coveo.com:2011-11-09 09:48:26:1315518092:True'

----------------------------------------

Unicode error hint

The string that could not be encoded/decoded was: Amélie:T
david
#1 david
  • +Started
  • +david
david
#2 david
Oops, we already have one of these.