UnicodeDecodeError Django MakeMessages

时间:2016-06-28 15:44:51

标签: python django

我在Django makemessages命令上获得了UnicodeDecodeError

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 533, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", line 278, in handle_noargs
    check_programs('msguniq', 'msgmerge', 'msgattrib')
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/makemessages.py", line 27, in check_programs
    if find_command(program) is None:
  File "/usr/local/lib/python2.7/site-packages/django/core/management/utils.py", line 77, in find_command
    fext = f + ext
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

我知道这通常意味着某个文件中某个特殊字符无法被识别,但是我在不同的Mac上使用相同的代码运行该命令并且在那里工作正常。

有没有人有任何建议?我正在运行Django 1.7.7。

0 个答案:

没有答案