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);

  • jenkins unable to run “ /build-tools/17.0.0/aapt ”
  • Using ANT properties in Jenkins build job
  • Jenkins Cannot find executable for ANT
  • Cannot find javahl, svnkit nor command line svn client
  • Injecting current git commit id into Java webapp
  • How to run a Nant task with Ant?
  • <!-- 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',),

  • How can I debug a git alias?
  • Git Svn Migration - Handling directory of binaries
  • cent os bash unrecognized option --system on adduser command
  • AWS Deployment Failed due to “HEALTH_CONSTRAINTS”
  • How can I branch my project to make sure I can get back to the original version?
  • git svn branch history missing
  • 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.