Replies: 9 comments 1 reply
-
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 : |
Beta Was this translation helpful? Give feedback.
-
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'. |
Beta Was this translation helpful? Give feedback.
-
Please follow this guide. Start from the version you come from up to |
Beta Was this translation helpful? Give feedback.
-
Hello ia have made all manual change required. maybe i missing this module? |
Beta Was this translation helpful? Give feedback.
-
Could you post the output of |
Beta Was this translation helpful? Give feedback.
-
root@mail:/home/ubuntu# /srv/modoboa/env/bin/pip list | grep modoboa |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Ok thanks and sorry for my ignorance in python. and after (folowing the guide) i launched error now is: |
Beta Was this translation helpful? Give feedback.
-
Yes thanks problem solved. Many thanks at all |
Beta Was this translation helpful? Give feedback.
-
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)
Beta Was this translation helpful? Give feedback.
All reactions