Wednesday, March 30, 2011

UnicodeDecodeError with makemessages in django-1.3

Hello,

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?

$ ./manage.py makemessages -l de
processing language de
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/path/to//django/core/management/__init__.py", line 438, in
execute_manager
utility.execute()
File "/path/to//django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/path/to//django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/path/to//django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/path/to//django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/path/to//django/core/management/commands/makemessages.py", 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/makemessages.py", line 233,
in make_messages
f.write(templatize(src, orig_file[2:]))
File "/path/to//django/utils/translation/__init__.py", line 127, in
templatize
return _trans.templatize(src, origin)
File "/path/to//django/utils/translation/trans_real.py", line 450, in
templatize
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 <eschler@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment