Multiple models files under a folder may cause error when makemessages

83 views
Skip to first unread message

ANi

unread,
May 30, 2019, 12:52:10 AM5/30/19
to Django users
As I only have one app but with many models, so I split the models into separate files under a model folder.
It works well until I run makemessages and it gives out error messages sort of like this:


CommandError: errors happened while running msguniq
E:\Projects\as\locale\django.pot:353:3: syntax error
E:\Projects\as\locale\django.pot:353: keyword "main" unknown
E:\Projects\as\locale\django.pot:353: keyword "models" unknown
E:\Projects\as\locale\django.pot:353: keyword "log" unknown
E:\Projects\as\locale\django.pot:353: keyword "py" unknown
E:\Projects\as\locale\django.pot:353: keyword "main" unknown
E:\Projects\as\locale\django.pot:353: keyword "models" unknown
E:\Projects\as\locale\django.pot:353: keyword "py" unknown
E:\Projects\as\locale\django.pot:355: keyword "main" unknown
E:\Projects\as\locale\django.pot:355: keyword "models" unknown
E:\Projects\as\locale\django.pot:355: keyword "py" unknown
E:\Projects\as\locale\django.pot:355: keyword "main" unknown
E:\Projects\as\locale\django.pot:355: keyword "models" unknown
E:\Projects\as\locale\django.pot:355: keyword "py" unknown
msguniq: found 14 fatal errors
 

then I rename the original folder and combine all the models into a single file for substitution.
but the error still occurs until I move the original folder out from the project.
so I think it is the problem of how Django parse the directories?




Reply all
Reply to author
Forward
0 new messages