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 manage.py and I started to see an error, but even when running from python;

C:\Users\markw\work\proj\src>python manage.py 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 
application.

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

  • Getting directory listing from SVN for use in ANT dropdown
  • Archiving artifacts not in the workspace when build fails
  • svnant command to copy files from an ssh repository to a sever?
  • Why does Zipping the same content twice gives two files with different SHA1?
  • how to build eclipse rcp application from .product with ant on jenkins
  • How to set $_SERVER variables when running phpunit tests through Jenkins
  • <!-- Compile the translations -->
    <target name="compile.trans" depends="init.properties">
        <exec executable="${deps.python}"
              dir="src"
              failonerror="true">
            <arg value="manage.py"/>
            <arg value="compilemessages"/>
        </exec>
    </target>
    

    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
        manage.py
    

    settings:

    LOCALE_PATHS = (
        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',),
    )
    

  • Techniques to handle a private and public repository?
  • How does Git decide where to save secret tokens exactly?
  • ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» when running rake assets:precompile on production
  • git: rewrite history: reorder and merge commits
  • “You are on a branch yet to be born” when adding git submodule
  • How would we begin using git when we currently have a dev and prod server?
  • 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.