1

I am using django-avatar in my website (Django 1.4). However, today I got this error:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 94-100: ordinal not in range(128)

Here is the full error log: http://dpaste.com/755691/

Any ideas what might that be, and how to solve it?

4

1 回答 1

1

It seems it encounters a character problem when looking up the avatar file. So you may have a user which has a profile image with a "weird" character in its filename. Have you checked the value of the variable path ? You may need to convert the filename so it does not contain characters from foreign languages.

于 2012-06-05T19:42:41.523 回答