Ask Your Question
0

Why do I get errors with "python manage.py makemessages"?

asked 2013-07-27 05:05:37 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-07-28 21:37:03 -0500

Evgeny gravatar image

Firstly - for Askbot please use command jinja2_makemessages (it's the same, but works with our templates).

The error that you've shown indicates that possibly your python environment has not been initiated properly or you might be lacking the project files such as settings.py, __init__.py, all the files made by the startproject command (or in the case of askbot - with askbot-setup command).

edit flag offensive delete link more

Comments

@Evgeny Could you explain more, I'm running the same issue here, and I don't have idea from where to start to solve this.

Mustafa gravatar imageMustafa ( 2013-08-10 12:37:44 -0500 )edit
0

answered 2013-08-10 13:08:44 -0500

Mustafa gravatar image

I was having the same issue here, and I found that I should run this command in askbot main directory where is 'locale' directory located, in my case I have two directories

/apache/askbot

The main app directory contains the 'templates' and 'locale' directories...etc. and

/apache/http/app

Where 'static' directory located and the manage.py and settings.py files

So in my case to make the following commands work correctly

$ python manage.py jinja2_makemessages 
$ python manage.py compilemessages 
$ python manage.py makemessages

simply do the following

$ cd /apache/askbot
$ python ../http/app/manage.py compilemessages
edit flag offensive delete link more

Comments

Work like a charm, thank you very much!.

rallende gravatar imagerallende ( 2014-05-04 01:09:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-07-27 05:05:37 -0500

Seen: 1,801 times

Last updated: Aug 10 '13