Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#10392 closed (fixed)

django-admin.py makemessages requires valid settings

Reported by: Jarek Zgoda Owned by: Malcolm Tredinnick
Component: Core (Management commands) Version: dev
Severity: Keywords: makemessages
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Today I tried to run makemessages to check for updated keys in Django framework source but I got exception saying I do not have valid settings. Sure I do not have because it's not a project but Django's own code...

jarek:~/install/django/django$ django-admin.py makemessages -l pl
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/__init__.py", line 341, in execute_from_command_line
    utility.execute()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/__init__.py", line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 228, in handle
    make_messages(locale, domain, verbosity, process_all, extensions)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 56, in make_messages
    settings.configure(USE_I18N = True)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/conf/__init__.py", line 46, in configure
    if self._target != None:
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/utils/functional.py", line 269, in __getattr__
    self._setup()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/conf/__init__.py", line 36, in _setup
    raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
jarek:~/install/django$ LANG=C svn info
Path: .
URL: http://code.djangoproject.com/svn/django/trunk
Repository Root: http://code.djangoproject.com/svn
Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
Revision: 9951
Node Kind: directory
Schedule: normal
Last Changed Author: mtredinnick
Last Changed Rev: 9951
Last Changed Date: 2009-03-02 07:08:02 +0100 (Mon, 02 Mar 2009)

Change History (3)

comment:1 by Malcolm Tredinnick, 16 years ago

Owner: changed from nobody to Malcolm Tredinnick
Status: newassigned

Whoops. Looks like r9945 broke something. I'll fix it now.

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [9953]) Fixed #10392 -- Fixed an oversight from the refactoring in r9945.

comment:3 by Malcolm Tredinnick, 16 years ago

(In [9954]) [1.0.X] Fixed #10392 -- Fixed an oversight from the refactoring in r9947.

Backport of r9953 from trunk.

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