Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10392 closed (fixed) makemessages requires valid settings

Reported by: Jarek Zgoda Owned by: Malcolm Tredinnick
Component: Core (Management commands) Version: master
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


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$ makemessages -l pl
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/", line 5, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/", line 341, in execute_from_command_line
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/", line 295, in execute
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/", 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/", 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/", 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/", 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/", 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/", line 269, in __getattr__
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/conf/", 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: .
Repository Root:
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 Changed 11 years ago by Malcolm Tredinnick

Owner: changed from nobody to Malcolm Tredinnick
Status: newassigned

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

comment:2 Changed 11 years ago by Malcolm Tredinnick

Resolution: fixed
Status: assignedclosed

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

comment:3 Changed 11 years ago by Malcolm Tredinnick

(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