-
Notifications
You must be signed in to change notification settings - Fork 13
UnicodeDecodeError at non-ascii album names #5
Description
The exception is raised in Playlist rendering. The problem-album-entry ist the folowing:
{'album': 'Boh\xc3\xa8me', 'artist': 'Annett Louisan', 'date': '2004', 'file': 'mp3 Jan/Annett Louis ian/Annett Louisan - Boheme/(Annett Louisan - Boh\xc3\xa8me 01) - Das Spiel.mp3', 'genre': 'Easy Listening', 'id': '790', 'pos': '0', 'time': '182', 'title': 'Das Spiel', 'track': '01'}
The Traceback:
File 'theory/theory/controllers/playlist.py', line 48 in index
return render('/playlist.html')
File 'theory/env/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py', line 243 in render_mako
cache_type=cache_type, cache_expire=cache_expire)
File 'theory/env/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py', line 218 in cached_template
return render_func()
File 'theory/env/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py', line 240 in render_template
return literal(template.render_unicode(*_globs))
File 'theory/env/lib/python2.6/site-packages/Mako-0.3.6-py2.6.egg/mako/template.py', line 292 in render_unicode
as_unicode=True)
File 'theory/env/lib/python2.6/site-packages/Mako-0.3.6-py2.6.egg/mako/runtime.py', line 575 in _render
*_kwargs_for_callable(callable, data))
File 'theory/env/lib/python2.6/site-packages/Mako-0.3.6-py2.6.egg/mako/runtime.py', line 607 in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File 'theory/env/lib/python2.6/site-packages/Mako-0.3.6-py2.6.egg/mako/runtime.py', line 633 in exec_template
callable(context, _args, *_kwargs)
File 'theory/data/templates/body.html.py', line 47 in render_body
__M_writer(escape(self.body()))
File 'theory/data/templates/playlist.html.py', line 97 in render_body
__M_writer(escape(t['album'].replace("'","'")))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)
Thank you
Jan