UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 27: ordinal not in range(128), HTTP response headers must be in US-ASCII format

Bug #613333 reported by Daniel Holbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LoCo Team Portal
Fix Released
Critical
Michael Hall

Bug Description

Traceback (most recent call last):

  File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/srv/loco.ubuntu.com/loco_directory/events/views.py", line 72, in team_event_list_ical
    return event_list_ical(team_events, team.name)

  File "/srv/loco.ubuntu.com/loco_directory/events/views.py", line 51, in event_list_ical
    response['Content-Disposition'] = 'attachment; filename=%s' % filename

  File "/var/lib/python-support/python2.5/django/http/__init__.py", line 314, in __setitem__
    header, value = self._convert_to_ascii(header, value)

  File "/var/lib/python-support/python2.5/django/http/__init__.py", line 306, in _convert_to_ascii
    yield value.encode('us-ascii')

UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 27: ordinal not in range(128), HTTP response headers must be in US-ASCII format

<ModPythonRequest
path:/events/team/ubuntu-lv/ical/,
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{},
META:{'AUTH_TYPE': None,
 'CONTENT_LENGTH': 0L,
 'CONTENT_TYPE': None,
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': '*/*',
 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
 'HTTP_CONNECTION': 'Keep-alive',
 'HTTP_FROM': 'googlebot(at)googlebot.com',
 'HTTP_HOST': 'loco.ubuntu.com',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
 'PATH_INFO': u'/events/team/ubuntu-lv/ical/',
 'PATH_TRANSLATED': None,
 'QUERY_STRING': None,
 'REMOTE_ADDR': '66.249.71.20',
 'REMOTE_HOST': None,
 'REMOTE_IDENT': None,
 'REMOTE_USER': None,
 'REQUEST_METHOD': 'GET',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'loco.ubuntu.com',
 'SERVER_PORT': 0,
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'mod_python'}>

Tags: events ical

Related branches

Changed in loco-directory:
importance: Undecided → Critical
status: New → Triaged
tags: added: events ical
Michael Hall (mhall119)
Changed in loco-directory:
status: Triaged → In Progress
assignee: nobody → Michael Hall (mhall119)
Changed in loco-directory:
milestone: none → 0.2.15
status: In Progress → Fix Committed
Changed in loco-directory:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.