django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().
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. utils.translati on' (/usr/lib/ python3/ dist-packages/ django/ utils/translati on/__init_ _.py) python3/ dist-packages/ openstack_ dashboard/ utils/settings. py", line 58, in import_submodules python3. 11/importlib/ __init_ _.py", line 126, in import_module _gcd_import( name[level: ], package, level) ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ _bootstrap> ", line 1204, in _gcd_import _bootstrap> ", line 1176, in _find_and_load _bootstrap> ", line 1147, in _find_and_ load_unlocked _bootstrap> ", line 690, in _load_unlocked _bootstrap_ external> ", line 940, in exec_module _bootstrap> ", line 241, in _call_with_ frames_ removed python3/ dist-packages/ openstack_ dashboard/ enabled/ _1370_project_ container_ infra_panel_ group.py" , line 14, in <module> utils.translati on import ugettext_lazy as _
[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 4cd9dfbeb1072b3 7912d0efee
Author: Akihiro Motoki <email address hidden>
Date: Wed Jan 26 22:42:15 2022 +0900
Address RemovedInDjango 40Warning (2)
django. utils.translati on.ugettext( ), ugettext_lazy(), ugettext_noop(), utils.translati on.gettext( ),
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:/ /docs.djangopro ject.com/ en/4.0/ releases/ 3.0/#id3
Change-Id: I77878f84e9d10c f6a136dada81eab f4e18676250