I used this x = list(MIDDLEWARE) x.insert(0, 'allauth.account.middleware.AccountMiddleware') MIDDLEWARE = x
but got (running mysql! with all the needed settings) SystemError: initialization of _psycopg raised unreported exception
arrrgh
(venv) mailman-web migrate Traceback (most recent call last): File "/opt/mailman/venv/bin/mailman-web", line 8, in <module> sys.exit(main()) ^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman_web/manage.py", line 37, in main execute_from_command_line(sys.argv) File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/management/base.py", line 96, in wrapped res = handle_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/management/commands/migrate.py", line 97, in handle self.check(databases=[database]) File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/management/base.py", line 475, in check all_issues = checks.run_checks( ^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/checks/registry.py", line 88, in run_checks new_errors = check(app_configs=app_configs, databases=databases) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/checks/urls.py", line 14, in check_url_config return check_resolver(resolver) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/checks/urls.py", line 24, in check_resolver return check_method() ^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/urls/resolvers.py", line 494, in check for pattern in self.url_patterns: ^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__ res = instance.__dict__[self.name] = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/urls/resolvers.py", line 715, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__ res = instance.__dict__[self.name] = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/urls/resolvers.py", line 708, in urlconf_module return import_module(self.urlconf_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/opt/mailman/venv/lib/python3.11/site-packages/mailman_web/urls.py", line 31, in <module> path('archives/', include('hyperkitty.urls')), ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/urls/conf.py", line 38, in include urlconf_module = import_module(urlconf_module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/opt/mailman/venv/lib/python3.11/site-packages/hyperkitty/urls.py", line 29, in <module> from hyperkitty.api import email as api_email File "/opt/mailman/venv/lib/python3.11/site-packages/hyperkitty/api/email.py", line 25, in <module> from rest_framework import generics, serializers File "/opt/mailman/venv/lib/python3.11/site-packages/rest_framework/generics.py", line 9, in <module> from rest_framework import mixins, views File "/opt/mailman/venv/lib/python3.11/site-packages/rest_framework/mixins.py", line 8, in <module> from rest_framework.response import Response File "/opt/mailman/venv/lib/python3.11/site-packages/rest_framework/response.py", line 11, in <module> from rest_framework.serializers import Serializer File "/opt/mailman/venv/lib/python3.11/site-packages/rest_framework/serializers.py", line 27, in <module> from rest_framework.compat import postgres_fields File "/opt/mailman/venv/lib/python3.11/site-packages/rest_framework/compat.py", line 26, in <module> from django.contrib.postgres import fields as postgres_fields File "/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/postgres/fields/__init__.py", line 1, in <module> from .array import * # NOQA ^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/postgres/fields/array.py", line 3, in <module> from django.contrib.postgres import lookups File "/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/postgres/lookups.py", line 4, in <module> from .search import SearchVector, SearchVectorExact, SearchVectorField File "/opt/mailman/venv/lib/python3.11/site-packages/django/contrib/postgres/search.py", line 1, in <module> import psycopg2 File "/opt/mailman/venv/lib/python3.11/site-packages/psycopg2/__init__.py", line 51, in <module> from psycopg2._psycopg import ( # noqa SystemError: initialization of _psycopg raised unreported exception