Opened 16 years ago

Last modified 16 years ago

#7910 closed

missing import in compilemessages — at Initial Version

Reported by: yml Owned by: nobody
Component: Internationalization Version: dev
Severity: Keywords: i18n, compilemessages
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

To put it in a nutshell someone should add :
from django.core.management.base import CommandError
At the top of the file called "compilemessages.py"

Traceback :
"""
django-survey\examples>django-admin.py compilemessages --setings="examples.settings"
Usage: C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\bin\django-admin.py compilemessages [options]

Compiles .po files to .mo files for use with builtin gettext support.

C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\bin\django-admin.py: error: no such option: -
-setings

C:\yml\_myScript_\dj_things\web_development\django-survey\examples>django-admin.py compilemessages --settings="examples
.settings"
Traceback (most recent call last):

File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\bin\django-admin.py", line 5, in <mod

ule>

management.execute_from_command_line()

File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\init.py", line 29

2, in execute_from_command_line

utility.execute()

File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\init.py", line 24

8, in execute

self.fetch_command(subcommand).run_from_argv(self.argv)

File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\base.py", line 77, in

run_from_argv

self.execute(*args, options.dict)

File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\base.py", line 91, in

execute

output = self.handle(*args, options)

File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\commands\compilemessa

ges.py", line 58, in handle

compile_messages(locale)

File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\commands\compilemessages.py", line 22, in compile_messages

raise CommandError("This script should be run from the Django SVN tree or your project or app tree, or with the sett

ings module specified.")
NameError: global name 'CommandError' is not defined

"""

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top