mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #2666] Error in modoboa-instance.log and server not starting after upgrade to modoboa 2.0.3 #1672
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#1672
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 @antoweb on GitHub (Nov 2, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2666
Impacted versions
Steps to reproduce
Current behavior
Error starting modoboa:
Wed Nov 2 08:38:40 2022 - *** Operational MODE: preforking ***
Traceback (most recent call last):
File "/srv/modoboa/instance/./instance/wsgi.py", line 16, in
application = get_wsgi_application()
File "/srv/modoboa/env/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
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 92, in populate
app_config = AppConfig.create(entry)
File "/srv/modoboa/env/lib/python3.8/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'drf-spectacular'
module drf-spectacular is correctly installed version 0.25:
postgres@mail:~$ pip show drf-spectacular
Name: drf-spectacular
Version: 0.24.2
Summary: Sane and flexible OpenAPI 3 schema generation for Django REST framework
Home-page: https://github.com/tfranzel/drf-spectacular
Author: T. Franzel
Author-email: tfranzel@gmail.com
License: BSD
Location: /usr/local/lib/python3.8/dist-packages
Requires: Django, djangorestframework, inflection, jsonschema, PyYAML, uritemplate
settings.py:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'reversion',
'ckeditor',
'ckeditor_uploader',
'rest_framework',
'rest_framework.authtoken',
'drf_spectacular',
'phonenumber_field',
'django_otp',
'django_otp.plugins.otp_totp',
'django_otp.plugins.otp_static',
)
Expected behavior
Video/Screenshot link (optional)
@Spitfireap commented on GitHub (Nov 2, 2022):
Hi,
It seems you have drf-spectacular installed as global package. If your venv was built before you installed it, it will not be in modoboa's venv.
To fix it :
/srv/modoboa/env/bin/pip install drf-spectacular@antoweb commented on GitHub (Nov 2, 2022):
Ok thanks but now i have another error
ImportError: Could not import 'modoboa.core.drf_authentication.JWTAuthenticationWith2FA' for API setting 'DEFAULT_AUTHENTICATION_CLASSES'. ModuleNotFoundError: No module named 'modoboa.core.drf_authentication'.
143.47.186.33:8080 [pid: 9568|app: 1|req: 2/2] 82.54.222.231 () {58 vars in 1055 bytes} [Wed Nov 2 09:04:40 2022] GET /favicon.ico => generated 0 bytes in 40 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
@Spitfireap commented on GitHub (Nov 2, 2022):
Please follow this guide. Start from the version you come from up to
2.0.3. You're missing some manual changes, I believe :)@antoweb commented on GitHub (Nov 2, 2022):
Hello ia have made all manual change required. maybe i missing this module?
ModuleNotFoundError: No module named 'modoboa.core.drf_authentication'
@Spitfireap commented on GitHub (Nov 2, 2022):
Could you post the output of
/srv/modoboa/env/bin/pip list | grep modoboaplease ?@antoweb commented on GitHub (Nov 2, 2022):
root@mail:/home/ubuntu# /srv/modoboa/env/bin/pip list | grep modoboa
modoboa 1.17.0
modoboa-amavis 1.3.1
modoboa-contacts 0.8.2
modoboa-pdfcredentials 1.4.0
modoboa-postfix-autoreply 1.6.1
modoboa-radicale 1.5.1
modoboa-sievefilters 1.5.0
modoboa-webmail 1.6.1
@Spitfireap commented on GitHub (Nov 2, 2022):
okay, so it seems you updated everything outside your venv. Please update it with your venv :
then update modoboa with pip as you did and reapply changes in the guide where the line starts with
(env).