0

I am running django 1.10 with python 3.5 on windows 7 and I am trying to translate my test files.

I have created the es language directory in the locale directory.

In the virtual environment, at the command prompt I enter: python manage.py makemessages --locale=es

I get the following error message:

....
.\manage.py
.\requirements.txt.py
.\requirements\base.txt.py
.\requirements\deployment.txt.py
.\requirements\development.txt.py
.\requirements\production.txt.py
.\runtime.txt.py
xgettext: Non-ASCII string at .\env\Lib\sitepackages\compressor\filters\cssmin\rcssmin.py:70.
          Please specify the source encoding through --from-code.

I have seen this post and changed the ascii to utf-8 and even tried utf8. I get the same error message.

When I open the file .\env\Lib\sitepackages\compressor\filters\cssmin\rcssmin.py, there is no code on line 70. Here is the relevant portion of the file:

Both python 2 (>= 2.4) and python 3 are supported.

.. _YUI compressor: https://github.com/yui/yuicompressor/

.. _the rule list by Isaac Schlueter: https://github.com/isaacs/cssmin/
"""
if __doc__:
    # pylint: disable = W0622
    __doc__ = __doc__.encode('ascii').decode('unicode_escape')
__author__ = r"Andr\xe9 Malo".encode('ascii').decode('unicode_escape')
__docformat__ = "restructuredtext en"
__license__ = "Apache License, Version 2.0"
__version__ = '1.0.6'
__all__ = ['cssmin']

import re as _re

I have run out of ideas. Does anyone have any suggestions?

Community
  • 1
  • 1
user1261774
  • 3,525
  • 10
  • 55
  • 103

2 Answers2

0

Maybe there is a character even if you don't see it. Try pasteing in notepad++ the text (sometimes it helps to detect wrong chars) or try to delete/rewrite close newlines, tabs, or similar symbols just in case they came from a copy/paste from a file with different coding.

klautern
  • 129
  • 3
  • 7
  • 26
0

This error was due to an old virtual environment folder that was on my system. I have deleted this folder, and a new error now displays. I have posted a different thread for the new error.

user1261774
  • 3,525
  • 10
  • 55
  • 103