2009/4/28 <liog...@gmail.com>

>
> UnicodeEncodeError at /admin/articles/article/18248/
>
> ('ascii', u'/home/httpd/html/media/doc/2009/04/28/\u90b3\u5dde\u516c
> \u53f8\u8df5\u884c\u79d1\u5b66\u53d1\u5c55\u89c2\u670d
> \u52a1\u53d1\u5c55\u5f53\u5148\u950b.jpg', 38, 56, 'ordinal not in
> range(128)')
>
> Request Method:         POST
> Request URL:    http://172.30.113.203/admin/articles/article/18248/
> Exception Type:         UnicodeEncodeError
> Exception Value:
>
> [snip]

68.         while self.exists(name):
> File "/usr/lib/python2.6/site-packages/django/core/files/storage.py"
> in exists
>  198.         return os.path.exists(self.path(name))
> File "/usr/lib/python2.6/genericpath.py" in exists
>  18.         st = os.stat(path)
>
> Exception Type: UnicodeEncodeError at /admin/articles/article/18248/
> Exception Value: ('ascii', u'/home/httpd/html/media/doc/
> 2009/04/28/\u90b3\u5dde\u516c\u53f8\u8df5\u884c
> \u79d1\u5b66\u53d1\u5c55\u89c2\u670d
> \u52a1\u53d1\u5c55\u5f53\u5148\u950b.jpg', 38, 56, 'ordinal not in
> range(128)')
>

os.stat raising an exception like this implies the code is running with an
incorrect LANG setting.  You don't mention what environment you are running
in, but see for example:

http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi#AdditionalTweaking

for some guidance on fixing things under Apache.

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-users@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