[Django]-Django makemessages command generates error: "xgettext: Non-ASCII string"

7πŸ‘

I found a fix in a similar question.
Find the directory in which the files are that produce the error and ignore them when exceute the manage.py makemessages command.

So if for example you’re venv folder produces the error use the makemessages comand like this:

manage.py makemessages -l ru -i venv

Link to that other question:
Django makemessages errors Unknown encoding "utf8"

πŸ‘€JaB

0πŸ‘

You should run the command with --ignore venv or -i venv ignoring virtual environment (myvenv in your case) as shown below, then the error is solved. *You can see my answer explaining why the error occurs in detail:

python manage.py makemessages --ignore ru myvenv
python manage.py makemessages -i ru myvenv

The commands below also work:

django-admin makemessages --ignore ru myvenv
django-admin makemessages -i ru myvenv

Leave a comment