Error occurs when trying to view release/album with non-ASCII characters in its title

Bug #580715 reported by Chris Wagner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Resonate
Fix Committed
Medium
Chris Wagner

Bug Description

E.g., try to view an album with a title like "Medúlla"...

Here is a relevant stack trace...

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/actions/__init__.py", line 33, in execute_view
    return render_to_response(template, template_vars)

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/actions/__init__.py", line 77, in render_to_response
    return HttpResponseOkay(render_template(template, template_vars))

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/lib/templates.py", line 15, in render_template
    return _get_template_env().get_template(template_name).render(**data). \

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/release.tpl", line 2, in top-level template code
    {% extends "members/base.tpl" %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/base.tpl", line 2, in top-level template code
    {% extends "base.tpl" %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/base.tpl", line 2, in top-level template code
    {% extends "bare-base.tpl" %}

  File "/home/chrisw/app-data/easyweaze/ui/templates/bare-base.tpl", line 41, in top-level template code
    {% block body %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/base.tpl", line 7, in block "body"
    {% block body_container %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/base.tpl", line 88, in block "body_container"
    {% block content %}

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/templates/members/release.tpl", line 146, in block "content"
    <a href="{{ release.default_encoding.zip_link() }}"

  File "/home/chrisw/lib/python2.5/jinja2/runtime.py", line 132, in call
    return __obj(*args, **kwargs)

  File "/home/chrisw/webapps/easyweaze/resonate/resonate/models.py", line 565, in zip_link
    t = re.sub(r'[^a-zA-Z0-9\-]', '', re.sub(' ', '-', str(self.release.album.title)))

UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 2: ordinal not in range(128)

Changed in resonate:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Chris Wagner (chris-wagner) wrote :

Fixed in revision 885.

Changed in resonate:
assignee: nobody → Chris Wagner (chris-wagner)
status: Confirmed → Fix Committed
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.