Django error on makemessages “should be run from the Django Git tree or your project or app tree”

So, I was working with an Ant build script to run some Django commands through and I started to see an error, but even when running from python;

C:\Users\markw\work\proj\src>python makemessages --all 
--ignore=unittests\* --no-wrap
CommandError: This script should be run from the Django Git tree or your project 
or app tree. If you did indeed run it from the Git checkout or your project or
application, maybe you are just missing the conf/locale (in the django tree) or 
locale (for project and application) directory? It is not created automatically, 
you have to create it by hand if you want to enable i18n for your project or 

The only change in my working copy is related to ANT and to confuse me further, the following ANT task completes correctly (as well as just running it from python);

  • java: generating a properties file that contains the svn version number
  • How to fork a background process in Jenkins? Setting BUILD_ID and using nohup seems to be non working
  • Running jenkins gives “package org.junit does not exist”
  • How to set $_SERVER variables when running phpunit tests through Jenkins
  • ANT checkout task fails
  • Run batch scripts on a remote server (windows) from jenkins
  • <!-- Compile the translations -->
    <target name="compile.trans" depends="">
        <exec executable="${deps.python}"
            <arg value=""/>
            <arg value="compilemessages"/>

    Is there something special about makemessages? I’ve tried to run it from src like compilemessages which worked just a day ago, and also from mysite which along with django has a locale folder with the .po files.

    Dir structure;

    - proj
        -- django
            -- conf
                -- locale
        -- mysite
            -- locale


        os.path.join(settings_central.BASE_PATH, 'templates', 'locale',),
        os.path.join(settings_central.BASE_PATH, 'mysite', 'locale',),
        os.path.join(settings_central.BASE_PATH, 'django', 'locale',),

  • Can't clone my Git repository
  • Storing a repository in subversion and git
  • how to set magit commit author?
  • Cherrypick commit orders
  • How do I import a third party lib into git?
  • How to create a release number in Jenkins from a Git tag?
  • One Solution collect form web for “Django error on makemessages “should be run from the Django Git tree or your project or app tree””

    Your project layout is slightly incorrect. Your project locale directory should be proj/locale and not proj/mysite/locale, really.

    Git Baby is a git and github fan, let's start git clone.