On Tue, Mar 30, 2010 at 5:45 PM, Alessandro Pasotti <apaso...@gmail.com>wrote:

> Hello,
>
> I need some help with a strange problem, the traceback says:
>
>
> File "/usr/lib/python2.5/site-packages/django/core/files/storage.py" in
> size
>   216.         return os.path.getsize(self.path(name))
> File "/usr/lib/python2.5/posixpath.py" in getsize
>   139.     return os.stat(filename).st_size
>
> Exception Type: TemplateSyntaxError at
> /resource/news/un-nuovo-ostello-sulla-francigena/
> Exception Value: Caught UnicodeEncodeError while rendering: 'ascii' codec
> can't encode character u'\xe0' in position 108: ordinal not in range(128)
>
> filename=u'/public_html/itineraria/site_media/attachments/resources_news/Rivista
> Oltre - ostello santhi\xe0.pdf'
>
>
> If I try this very same code from the python shell it runs without any
> problem, I'm on Ubuntu Gutsy if that matters, and DB is UTF-8 as my source
> files are Django is SVN trunk.
>
> Deployment is with mod_wsgi.
>
>
See:

http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror

Though in the mod_python doc, it applies to mod_wsgi as well. (That section
should really be put somewhere common.)

Though the noted envvars file is OS-specific, changing it works on my Ubuntu

machine
Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to