#26940: makemessages incorrectly configured as not requiring settings
-------------------------------------+-------------------------------------
Reporter: Jorge Romero | Owner: nobody
Type: Bug | Status: closed
Component: | Version: dev
Internationalization |
Severity: Normal | Resolution: fixed
Keywords: translations | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):
* cc: Claude Paroz (added)
Comment:
There seems to be a potential regression about this in current `main` (6.0
development cycle). When running:
{{{
$ django-admin --version
6.0.dev20250506141140
}}}
{{{
$ django-admin makemessages --all -v 2
Traceback (most recent call last):
File "/home/nessita/.venvs/djangodev-3.13/bin/django-admin", line 8, in
<module>
sys.exit(execute_from_command_line())
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File
"/home/nessita/fellowship/django/django/core/management/__init__.py", line
442, in execute_from_command_line
utility.execute()
~~~~~~~~~~~~~~~^^
File
"/home/nessita/fellowship/django/django/core/management/__init__.py", line
436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/nessita/fellowship/django/django/core/management/base.py",
line 416, in run_from_argv
self.execute(*args, **cmd_options)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/nessita/fellowship/django/django/core/management/base.py",
line 460, in execute
output = self.handle(*args, **options)
File
"/home/nessita/fellowship/django/django/core/management/commands/makemessages.py",
line 372, in handle
% get_text_list(list(self.extensions), "and")
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nessita/fellowship/django/django/utils/functional.py", line
231, in wrapper
return func(*args, **kwargs)
File "/home/nessita/fellowship/django/django/utils/text.py", line 306,
in get_text_list
_(", ").join(str(i) for i in list_[:-1]),
~^^^^^^
File
"/home/nessita/fellowship/django/django/utils/translation/__init__.py",
line 96, in gettext
return _trans.gettext(message)
^^^^^^^^^^^^^^
File
"/home/nessita/fellowship/django/django/utils/translation/__init__.py",
line 66, in __getattr__
if settings.USE_I18N:
^^^^^^^^^^^^^^^^^
File "/home/nessita/fellowship/django/django/conf/__init__.py", line 75,
in __getattr__
self._setup(name)
~~~~~~~~~~~^^^^^^
File "/home/nessita/fellowship/django/django/conf/__init__.py", line 55,
in _setup
raise ImproperlyConfigured(
...<4 lines>...
)
django.core.exceptions.ImproperlyConfigured: Requested setting USE_I18N,
but settings are not configured. You must either define the environment
variable DJANGO_SETTINGS_MODULE or call settings.configure() before
accessing settings.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26940#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070196a695c00f-7cf58ac0-7067-42cc-a411-ed4946d58111-000000%40eu-central-1.amazonses.com.