The same code on my computer offline works without problems, so I guess It's a server configuration problem, what do you think?
I read the this bit here: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror And it says to write something similar to: export LANG='en_US.UTF-8' export LC_ALL='en_US.UTF-8' But where? I've looked around the net but I can't understand how do I set this environment variables? The server I'm talking about is a Red Hat Linux Enterprise. I can't fix this problem. I hope my client doesn't get pissed off at me :-S On Jun 15, 9:47 am, Matt Hoskins <skaffe...@googlemail.com> wrote: > > 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) > > What this error means is that either path or b is a normal (non- > unicode) string and contains a non-ascii character (perhaps the > character Ã) at position 13 and the other one is a unicode string. > When python concatenates a non-unicode string and a unicode string it > tries to convert the non-unicode string to unicode using the ascii > encoding. > > As to which is which... well I've had a brief glance at the sorl code > and it'll take more time than I can be bothered to spend to figure out > which :). My guess is that the filename coming from Django is coming > in as a unicode string, although sorl has a number of normal string > literals in it I suspect that's making it through as unicode... So > that perhaps leaves your sorl path configurations - perhaps you're not > configuring the directory paths for sorl using unicode strings and > that's causing the problem. > > Matt -- 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.