mezzanine: Fresh Install UnicodeEncodeError at /gallery/

Hi Stephen,

Latest 1.0.8 fresh PIP install here, when attempting to access the sample gallery the below happens:

UnicodeEncodeError at /gallery/
'ascii' codec can't encode character u'\u0301' in position 101: ordinal not in range(128)Request Method:    GET
Request URL:    http://new.kingstoncleanfreaks.com/gallery/
Django Version: 1.5.dev17871
Exception Type: UnicodeEncodeError
Exception Value:    'ascii' codec can't encode character u'\u0301' in position 101: ordinal not in range(128)
Exception Location: /usr/lib/python2.6/genericpath.py in exists, line 18
Python Executable:  /usr/bin/python
Python Version: 2.6.6
Python Path:    ['/srv/www/django/kingstoncleanfreaks.com/src/django-project',
 '/srv/www/django/kingstoncleanfreaks.com/virtualenv/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg',
 '/srv/www/django/kingstoncleanfreaks.com/virtualenv/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg',
 '/srv/www/django/kingstoncleanfreaks.com/virtualenv/src/django',
 '/srv/www/django/kingstoncleanfreaks.com/virtualenv/lib/python2.6/site-packages',
 '/usr/lib/python2.6',
 '/usr/lib/python2.6/plat-linux2',
 '/usr/lib/python2.6/lib-tk',
 '/usr/lib/python2.6/lib-old',
 '/usr/lib/python2.6/lib-dynload',
 '/usr/local/lib/python2.6/dist-packages',
 '/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg-info',
 '/usr/lib/python2.6/dist-packages',
 '/usr/lib/python2.6/dist-packages/PIL',
 '/usr/lib/pymodules/python2.6']
Server time:    Thu, 5 Apr 2012 23:44:40 -0400

Unicode error hint

The string that could not be encoded/decoded was: ils/A´vila,
Error during template rendering

In template /srv/www/django/kingstoncleanfreaks.com/virtualenv/lib/python2.6/site-packages/mezzanine/galleries/templates/pages/gallery.html, error at line 23
ascii13 
14  {% editable page.gallery.content %}
15  {{ page.gallery.content|richtext_filter|safe }}
16  {% endeditable %}
17  
18  <ul class="thumbnails gallery">
19  {% with page.gallery.images.all as images %}
20  {% for image in images %}
21  <li>
22      <a class="thumbnail" rel="#image-{{ image.id }}" title="{{ image.description }}" href="{{ image.file }}">
23          <img class="image-overlay-thumb" src="{{ MEDIA_URL }}{% thumbnail image.file 75 75 %}">
24      </a>
25      <div id="image-{{ image.id }}" class="image-overlay" style="display:none;">
26          <a href="#" class="image-overlay-prev">&larr;</a>
27          <a href="#" class="image-overlay-next">&rarr;</a>
28          <img class="image-overlay-full" src="{{ MEDIA_URL }}{% thumbnail image.file 0 600 %}"><br>
29          <p>{{ image.description }}<br>{{ forloop.counter }} / {{ images|length }}</p>
30      </div>
31  {% endfor %}
32  {% endwith %}
33  </ul>

Traceback Switch back to interactive view

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 22 (11 by maintainers)

Most upvoted comments

BINGO!!! in /etc/apache2/envars

Uncomment the following line to use the system default locale instead:

. /etc/default/locale WORKS. Thank you Stephen. (I owe you a beer!)