Opened 10 years ago
Closed 10 years ago
#22631 closed Bug (fixed)
makemessages problem due to bad encoding in migration file
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Internationalization | Version: | 1.7-beta-2 |
Severity: | Normal | Keywords: | i18n migrations |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Basically, when i run the command "django-admin.py makemessages -l es_AR", I receive the following error:
CommandError: errors happened while running xgettext on 0001_initial.py
xgettext: ./career/migrations/0001_initial.py:1: Unknown encoding "utf8". Proceeding with ASCII instead.
xgettext: Non-ASCII string at ./career/migrations/0001_initial.py:19.
Please specify the source encoding through --from-code or through a comment
as specified in http://www.python.org/peps/pep-0263.html.
When I looked at the file "0001_initial.py" I found this: " # encoding: utf8 " when it should be " # -*- encoding: utf-8 -*- ". After I fixed that I could run the command without problem.
Thanks for the report, but I fixed that yesterday: e520a73eeea6b185b719901ab9985ecef00e5664 (also backported on 1.7)