cannot import name 'ugettext_lazy' from 'django.utils.translation'
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Magnum UI |
New
|
Undecided
|
Unassigned | |||
OpenStack Dashboard Charm |
In Progress
|
High
|
Unassigned | |||
Ubuntu Cloud Archive | Status tracked in Bobcat | |||||
Bobcat |
Triaged
|
High
|
Unassigned | |||
watcher-dashboard |
New
|
Undecided
|
Unassigned | |||
magnum-ui (Ubuntu) | Status tracked in Mantic | |||||
Mantic |
Triaged
|
High
|
Unassigned | |||
watcher-dashboard (Ubuntu) | Status tracked in Mantic | |||||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On Ubuntu Mantic, the dashboard fails to load and the apache error log shows:
[Thu Oct 12 20:33:48.383727 2023] [wsgi:error] [pid 52899:tid 140293563209408] ERROR:root:cannot import name 'ugettext_lazy' from 'django.
[Thu Oct 12 20:33:48.383757 2023] [wsgi:error] [pid 52899:tid 140293563209408] Traceback (most recent call last):
[Thu Oct 12 20:33:48.383764 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "/usr/lib/
[Thu Oct 12 20:33:48.383769 2023] [wsgi:error] [pid 52899:tid 140293563209408] submodule = import_module(name)
[Thu Oct 12 20:33:48.383773 2023] [wsgi:error] [pid 52899:tid 140293563209408] ^^^^^^^^^^^^^^^^^^^
[Thu Oct 12 20:33:48.383777 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "/usr/lib/
[Thu Oct 12 20:33:48.383787 2023] [wsgi:error] [pid 52899:tid 140293563209408] return _bootstrap.
[Thu Oct 12 20:33:48.383791 2023] [wsgi:error] [pid 52899:tid 140293563209408] ^^^^^^^
[Thu Oct 12 20:33:48.383795 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "<frozen importlib.
[Thu Oct 12 20:33:48.383799 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "<frozen importlib.
[Thu Oct 12 20:33:48.383803 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "<frozen importlib.
[Thu Oct 12 20:33:48.383807 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "<frozen importlib.
[Thu Oct 12 20:33:48.383811 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "<frozen importlib.
[Thu Oct 12 20:33:48.383814 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "<frozen importlib.
[Thu Oct 12 20:33:48.383818 2023] [wsgi:error] [pid 52899:tid 140293563209408] File "/usr/lib/
[Thu Oct 12 20:33:48.383823 2023] [wsgi:error] [pid 52899:tid 140293563209408] from django.
It looks like the charm template needs updating to work with Django 4.x in Mantic.
See upstream commit in horizon:
commit cd7c1b5110fe1f6
Author: Akihiro Motoki <email address hidden>
Date: Wed Jan 26 22:42:15 2022 +0900
Address RemovedInDjango
django.
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().
https:/
Change-Id: I77878f84e9d10c
Changed in charm-openstack-dashboard: | |
status: | New → Triaged |
importance: | Undecided → High |
https:/ /review. opendev. org/c/openstack /watcher- dashboard/ +/898235