Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21269 closed Bug (fixed)

UnicodeDecodeError on makemessages -d djangojs

Reported by: kontakt@… Owned by: nobody
Component: Core (Management commands) Version: 1.6-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm getting an UnicodeDecodeError when running makemessages -d djangojs -l de.

processing locale de
Traceback (most recent call last):
  File "/home/eike/public_html/test/env2/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/home/eike/public_html/test/env2/lib/python2.7/site-packages/django/core/management/__init__.py", line 397, in execute_from_command_line
    utility.execute()
  File "/home/eike/public_html/test/env2/lib/python2.7/site-packages/django/core/management/__init__.py", line 390, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/eike/public_html/test/env2/lib/python2.7/site-packages/django/core/management/base.py", line 247, in run_from_argv
    stderr.write('%s: %s' % (e.__class__.__name__, e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 47: ordinal not in range(128)

I'm using Python 2.7.5 and the latest beta. I tested this with Django 1.5 too and it works without any problems.

Change History (3)

comment:1 by Claude Paroz, 11 years ago

Component: TranslationsCore (Management commands)
Triage Stage: UnreviewedAccepted

I guess the issue is due to CommandError containing non-ascii content. I'll try to prepare a fix (probably adding more unicode_literals).

comment:2 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 42a67ec1cd8cbaffd87f0a7b34714f7d4a259cfb:

Fixed #21269 -- Don't crash when CommandError contains non-ascii

Thanks kontakt@… for the report.

comment:3 by Claude Paroz <claude@…>, 11 years ago

In ba9cf9596bb07d30614257a755f3e4fea426d2e2:

[1.6.x] Fixed #21269 -- Don't crash when CommandError contains non-ascii

Thanks kontakt@… for the report.

Backport of 42a67ec1cd from master.

Note: See TracTickets for help on using tickets.
Back to Top