Wednesday, March 30, 2011

UnicodeDecodeError with makemessages in django-1.3


i get a UnicodeDecodeError when running makemessages in the project folder
with django-1.3, it works fine with django-1.2.

The release notes mention a change in the project-level handling of
translations. Adding the project locale folder to LOCALE_PATHS doesn't seem to
make a difference. I'm not sure if i understand the deprecation correctly -
does it mean that the whole locale folder in the project directory should be
dropped in favour of app level locale folders? Has this anything to do with
the exception i get?

$ ./ makemessages -l de
processing language de
Traceback (most recent call last):
File "./", line 11, in <module>
File "/path/to//django/core/management/", line 438, in
File "/path/to//django/core/management/", line 379, in execute
File "/path/to//django/core/management/", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/path/to//django/core/management/", line 220, in execute
output = self.handle(*args, **options)
File "/path/to//django/core/management/", line 351, in handle
return self.handle_noargs(**options)
File "/path/to//django/core/management/commands/", line 365,
in handle_noargs
make_messages(locale, domain, verbosity, process_all, extensions,
symlinks, ignore_patterns, no_wrap, no_obsolete)
File "/path/to//django/core/management/commands/", line 233,
in make_messages
f.write(templatize(src, orig_file[2:]))
File "/path/to//django/utils/translation/", line 127, in
return _trans.templatize(src, origin)
File "/path/to//django/utils/translation/", line 450, in
content = u''.join(comment)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 284:
ordinal not in range(128)

Best Regards,
Dirk Eschler

Dirk Eschler <>

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment