On Mon, Jun 14, 2010 at 10:12 AM, Federico Capoano <nemesis.des...@libero.it > wrote:
> Hello to all. > > Version 1.2.1: > > In the admin, just noticed that when I delete any of the dynamic > inlines (an image basically) of a form and then I hit the SAVE button > the image is deleted successfully but I get this error: > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > 13: ordinal not in range(128) > > Can someone gives me a suggestion about what this error is about? I > can't understand. > > Complete traceback: > > [snip] > File "/usr/lib/python2.3/site-packages/sorl/thumbnail/utils.py", > line 36, in all_thumbnails > if os.path.isfile(os.path.join(path, file)): > > File "/usr/local/lib/python2.6/posixpath.py", line 68, in join > path += b > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > 13: ordinal not in range(128) > First, there's something a bit odd in that traceback. You jump from /usr/lib/python2.3 to /usr/local/lib/python2.6. I would be a little bit worried about version mismatches here: it looks like you are pulling stuff from site-packages under the python2.3 directory when you are actually running python 2.6. Though that may work for some things, a package installed under python2.3 may not run properly under 2.6. It would be cleaner to install whatever packages you are using when running python2.6 under 2.6 itself rather than pulling in the 2.3-installed version. However, that's likely not the cause of this problem. A file system function raising a unicode error generally means the locale is set in a way that Python thinks the preferred file system encoding is ASCII. You need to set the locale of the server so that the preferred file system encoding is something other than ASCII, so that unicode strings containing non-ASCII data can be successfully passed to the file system functions. See: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror. (Though the doc is in the mod_python section it is not a mod_python-specific problem. And though that doc mentions UnicodeEncodeError and you are seeing DecodeError, I believe it is the same problem, it's just you are seeing a slightly different symptom due to a slightly different file operation being attempted.) Karen -- http://tracey.org/kmt/ -- 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.