Opened 16 years ago

Closed 16 years ago

#7643 closed (fixed)

manage.py makemessages not working

Reported by: Horst Gutmann <zerok@…> Owned by: Jannis Leidel
Component: Core (Management commands) Version: dev
Severity: Keywords: makemessages, i18n, command
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When executing the new ( #5522 ) makemessages command using manage.py, I receive a runtime error indicating that settings are initialized twice:

$ python manage.py makemessages -a
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/__init__.py", line 272, in execute_manager
    utility.execute()
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/__init__.py", line 219, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/base.py", line 77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/base.py", line 91, in execute
    output = self.handle(*args, **options)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 159, in handle
    make_messages(locale, domain, verbosity, process_all)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 17, in make_messages
    settings.configure(USE_I18N = True)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/conf/__init__.py", line 68, in configure
    raise RuntimeError, 'Settings already configured.'
RuntimeError: Settings already configured.

Attached is a small patch that's supposed to solve this and still work with django-admin.py :-)

Attachments (1)

makemessages.diff (663 bytes ) - added by Horst Gutmann <zerok@…> 16 years ago.

Download all attachments as: .zip

Change History (3)

by Horst Gutmann <zerok@…>, 16 years ago

Attachment: makemessages.diff added

comment:1 by Jannis Leidel, 16 years ago

Owner: changed from nobody to Jannis Leidel
Status: newassigned

I can confirm this, must have slipped through, d'oh.

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [7848]) Fixed #7643 -- Fixed an oversight from [7844].

Now makemessages works in projects again. Based on a patch from Horst Gutmann.

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