[GH-ISSUE #3074] Update to 2.2.0 #1755

Closed
opened 2026-02-27 11:18:56 +03:00 by kerem · 3 comments
Owner

Originally created by @lolhunter121 on GitHub (Sep 27, 2023).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3074

Update failed. Multiple errors
(env) modoboa@mail:~/instance$ python manage.py migrate
Traceback (most recent call last):
File "/srv/modoboa/instance/manage.py", line 22, in
main()
File "/srv/modoboa/instance/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/srv/modoboa/env/lib/python3.9/site-packages/django/core/management/in it.py", line 442, in execute_from_command_line
utility.execute()
File "/srv/modoboa/env/lib/python3.9/site-packages/django/core/management/in it.py", line 416, in execute
django.setup()
File "/srv/modoboa/env/lib/python3.9/site-packages/django/init.py", line 2 4, in setup
apps.populate(settings.INSTALLED_APPS)
File "/srv/modoboa/env/lib/python3.9/site-packages/django/apps/registry.py", l ine 116, in populate
app_config.import_models()
File "/srv/modoboa/env/lib/python3.9/site-packages/django/apps/config.py", lin e 269, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/srv/modoboa/env/lib/python3.9/site-packages/modoboa_amavis/models.py", line 16, in
from django.utils.translation import ugettext_lazy
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/srv/modoboa/env/lib/python3.9/site-packages/django/utils/translation/init. py)

Originally created by @lolhunter121 on GitHub (Sep 27, 2023). Original GitHub issue: https://github.com/modoboa/modoboa/issues/3074 Update failed. Multiple errors (env) modoboa@mail:~/instance$ python manage.py migrate Traceback (most recent call last): File "/srv/modoboa/instance/manage.py", line 22, in <module> main() File "/srv/modoboa/instance/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/srv/modoboa/env/lib/python3.9/site-packages/django/core/management/__in it__.py", line 442, in execute_from_command_line utility.execute() File "/srv/modoboa/env/lib/python3.9/site-packages/django/core/management/__in it__.py", line 416, in execute django.setup() File "/srv/modoboa/env/lib/python3.9/site-packages/django/__init__.py", line 2 4, in setup apps.populate(settings.INSTALLED_APPS) File "/srv/modoboa/env/lib/python3.9/site-packages/django/apps/registry.py", l ine 116, in populate app_config.import_models() File "/srv/modoboa/env/lib/python3.9/site-packages/django/apps/config.py", lin e 269, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 790, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/srv/modoboa/env/lib/python3.9/site-packages/modoboa_amavis/models.py", line 16, in <module> from django.utils.translation import ugettext_lazy ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/srv/modoboa/env/lib/python3.9/site-packages/django/utils/translation/__init__. py)
kerem closed this issue 2026-02-27 11:18:56 +03:00
Author
Owner

@lolhunter121 commented on GitHub (Sep 27, 2023):

Self open - self answer.
You need to upgrade ALL extensions BEFORE upgrade of modoboa. Then all goes smooth.

<!-- gh-comment-id:1737586756 --> @lolhunter121 commented on GitHub (Sep 27, 2023): Self open - self answer. You need to upgrade ALL extensions BEFORE upgrade of modoboa. Then all goes smooth.
Author
Owner

@jgfoster commented on GitHub (Oct 13, 2023):

@tonioo, By closing this do you mean to imply that the solution is to not follow the upgrade instructions (upgrade Modoboa before extensions)? If so, then doesn't that mean that there is an error in the documentation? In any case, the "solution" didn't work for me so I'll open another issue.

<!-- gh-comment-id:1762279042 --> @jgfoster commented on GitHub (Oct 13, 2023): @tonioo, By closing this do you mean to imply that the solution is to not follow the [upgrade instructions](https://modoboa.readthedocs.io/en/latest/upgrade.html) (upgrade Modoboa before extensions)? If so, then doesn't that mean that there is an error in the documentation? In any case, the "solution" didn't work for me so I'll open another issue.
Author
Owner

@lolhunter121 commented on GitHub (Oct 16, 2023):

@jgfoster It was multiple errors with Django. Looks like broken depencies in most of extensions. So when I upgrade modoboa it stuck on depencies in extensions. When i upgrade all extensions by hands - process goes normally.

<!-- gh-comment-id:1763940368 --> @lolhunter121 commented on GitHub (Oct 16, 2023): @jgfoster It was multiple errors with Django. Looks like broken depencies in most of extensions. So when I upgrade modoboa it stuck on depencies in extensions. When i upgrade all extensions by hands - process goes normally.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1755
No description provided.