Django 1.5 compilemessages fails

426 Views Asked by At

Trying to run $ python manage.py compilemessages fails in Django 1.5.2.

Returns UnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 35: ordinal not in range(128)

2

There are 2 best solutions below

0
On

Double-check your project settings. It might be that your LOCALE_PATHS or LANGUAGES setting contains non-unicode strings.

0
On

Check if you are not forgetting the comma at the end of the LOCALE_PATHS, should be like this:

LOCALE_PATHS = (
    os.path.join(PROJECT_ROOT, 'locale'),
)

If doesnt work, open the compilemessages.py file and print your basedir and the files. Maybe you have forgot to add # coding: utf-8 to the top of a file or your basedir is incorrect.