Sorry folks. I am back again. I completely wiped out /opt/mailman. I went into the os package manager and removed all their versions just to make sure that did not interfere. I started the instructions again I followed the basic directions plus all our adjustments from the previous mail chain like manually install import_resources
Note there were zero issues this time with venv or pip.
python3 -m venv venv vi .bashrc exit pip install wheel mailman psycopg2-binary\<2.9 vi /etc/mailman3/mailman.cfg mailman info <-- had the path error pip install "importlib_resources<6.0" mailman info <-- has the error below.
I checked postgresql: (venv) mailman@mail:~> psql psql (16.0, server 13.12) Type "help" for help.
mailman=> \dt List of relations Schema | Name | Type | Owner --------+--------------------+-------+--------- public | _request | table | mailman public | acceptablealias | table | mailman public | address | table | mailman public | alembic_version | table | mailman public | autoresponserecord | table | mailman public | ban | table | mailman public | bounceevent | table | mailman public | contentfilter | table | mailman public | domain | table | mailman public | domain_owner | table | mailman public | file_cache | table | mailman public | headermatch | table | mailman public | listarchiver | table | mailman public | mailinglist | table | mailman public | member | table | mailman public | message | table | mailman public | onelastdigest | table | mailman public | pended | table | mailman public | pendedkeyvalue | table | mailman public | preferences | table | mailman public | template | table | mailman public | uid | table | mailman public | user | table | mailman public | workflowstate | table | mailman (24 rows)
mailman=> \q
For grins I commented out the DB url in /etc/mailman3/mailman.cfg and this is what I get:
(venv) mailman@mail:~> mailman info GNU Mailman 3.3.8 (Tom Sawyer) Python 3.11.5 (main, Aug 31 2023, 07:57:41) [GCC] config file: /etc/mailman3/mailman.cfg db url: sqlite:////opt/mailman/mm/var/data/mailman.db devmode: DISABLED REST root url: http://localhost:8001/3.1/ REST credentials: restadmin:restpass
So clearly the issue is caused by the DB url: url: postgresql://mailman:XXXXX@localhost/mailman
something between python and PostgreSQL.
(venv) mailman@mail:~> mailman info Traceback (most recent call last): File "/opt/mailman/venv/bin/mailman", line 8, in <module> sys.exit(main()) ^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/click/core.py", line 1077, in main with self.make_context(prog_name, args, **extra) as ctx: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/click/core.py", line 943, in make_context self.parse_args(ctx, args) File "/opt/mailman/venv/lib64/python3.11/site-packages/click/core.py", line 1644, in parse_args rest = super().parse_args(ctx, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/click/core.py", line 1408, in parse_args value, args = param.handle_parse_result(ctx, opts, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/click/core.py", line 2400, in handle_parse_result value = self.process_value(ctx, value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/click/core.py", line 2362, in process_value value = self.callback(ctx, self, value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/mailman/bin/mailman.py", line 95, in initialize_config initialize(value) File "/opt/mailman/venv/lib64/python3.11/site-packages/mailman/core/initialize.py", line 229, in initialize initialize_2(propagate_logs=propagate_logs) File "/opt/mailman/venv/lib64/python3.11/site-packages/mailman/core/initialize.py", line 187, in initialize_2 config.db = getUtility(IDatabaseFactory, utility_name).create() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/mailman/database/factory.py", line 57, in create database.initialize() File "/opt/mailman/venv/lib64/python3.11/site-packages/mailman/database/base.py", line 117, in initialize self.engine = create_engine( ^^^^^^^^^^^^^^ File "<string>", line 2, in create_engine File "/opt/mailman/venv/lib64/python3.11/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned return fn(*args, **kwargs) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/sqlalchemy/engine/create.py", line 601, in create_engine dbapi = dbapi_meth(**dbapi_args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 690, in import_dbapi import psycopg2 File "/opt/mailman/venv/lib64/python3.11/site-packages/psycopg2/__init__.py", line 51, in <module> from psycopg2._psycopg import ( # noqa SystemError: initialization of _psycopg raised unreported exception