mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 09:26:00 +03:00
[GH-ISSUE #2618] ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' #1658
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1658
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kisst on GitHub (Sep 27, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2618
Impacted versions
Steps to reproduce
Upgrade the modoboa version to latest ?
Current behavior
Can't run manage.py
Expected behavior
I can run manage.py.
Video/Screenshot link (optional)
@tonioo commented on GitHub (Sep 30, 2022):
@kisst For same reason, you're not using the latest version of the autoreply plugin.
@kisst commented on GitHub (Oct 11, 2022):
Ok that solved this specific error, but still struggling with many others, I had to install back in the day with version 2 in a beta stage, as the "stable" just did not work, but now trying to stabilise it, and it's far from trivial.
I hate to compare it to "others" but ... as I used Mailcow before I seen the power of
./update.shand it's just light-years ahead.Some of the current errors are the "usual"
@antoweb commented on GitHub (Nov 2, 2022):
Hello i have the same error:
(env) root@mail:/srv/modoboa/instance# python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute
django.setup()
File "/srv/modoboa/env/lib/python3.8/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/srv/modoboa/env/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/srv/modoboa/env/lib/python3.8/site-packages/modoboa_postfix_autoreply/models.py", line 7, in
from django.utils.encoding import python_2_unicode_compatible, smart_text
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (/srv/modoboa/env/lib/python3.8/site-packages/django/utils/encoding.py)
how to solve?
@kisst commented on GitHub (Nov 4, 2022):
@antoweb in my case the solution was based on https://modoboa.readthedocs.io/en/latest/upgrade.html#modoboa
I solved it with:
@antoweb commented on GitHub (Nov 4, 2022):
Thanks but the problem was all extensions outdated. After updating all extensions the service start successfully
@Jammrock commented on GitHub (Jan 27, 2023):
I'm having the same issue. Clean install of modoboa using run.py from modoboa-installer, on a fresh build of Ubuntu 22.04.