I know this post is outdated but I had the same issue today, and it took me hours to find out why. Maybe people will be in the same case :
My virtualenv is in my django root directory :
Here is my project tree :
DjangoDirectory:
- my_env
- Django_App1
- Django_App2
- ...
- ...
- manage.py
When I launch command :
./manage.py makemessages -l fr
I get the same error :
Error: errors happened while running xgettext on __init__.py
...
In fact, I noticed that xgettext looked into ALL the files in my folder, as well as files in my_env.
So I found the -i flag which ignore files or folders during the makemessages process
So now, with the command below it works like a charm and I don't get the error anymore.
./manage.py makemessages -l fr -i my_env
Hope it will help
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…