Your symlimks don't make sense to me. And BTW why do you need symlimks in the first place? Your new virtualenv should be purely a Python3.11 instance. I don't see such an error in my staging environment which is identical to yours. Did you do a fresh install then migrate the data as I proposed earlier?
On Thu, Apr 27, 2023, 22:19 Lars Bjørndal <lars@lamasti.net> wrote:
Hi, Mark!
You wrote:
On 4/27/23 11:42 AM, Lars Bjørndal wrote:
After I've installed the venv and packages again, I get the following error when running the mailman command from within the venv:
SystemError: initialization of _psycopg raised unreported exception
How do I fix that?
The first issue arises because the venv/bin/ directory contains only symlinks to a system python3, and either they broke upon the upgrade or they pointed to what is now Python 3.11 and there was some incompatibility between that python and modules in the venv.
I have some symlinks:
python -> /usr/bin/python python3 -> python python3.11 -> python
Did you install psycopg2-binary as discussed at https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-mailm...
Yes, I did.
Is the error logged in var/logs/mailman.log? If so, what's the traceback?
No. But the traceback is:
Traceback (most recent call last): File "/opt/mailman3/venv/bin/mailman", line 8, in <module> sys.exit(main()) ^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/click/core.py", line 1054, in main with self.make_context(prog_name, args, **extra) as ctx: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/click/core.py", line 920, in make_context self.parse_args(ctx, args) File "/opt/mailman3/venv/lib64/python3.11/site-packages/click/core.py", line 1613, in parse_args rest = super().parse_args(ctx, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/click/core.py", line 1378, in parse_args value, args = param.handle_parse_result(ctx, opts, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/click/core.py", line 2360, in handle_parse_result value = self.process_value(ctx, value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/click/core.py", line 2322, in process_value value = self.callback(ctx, self, value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/bin/mailman.py", line 95, in initialize_config initialize(value) File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/core/initialize.py", line 229, in initialize initialize_2(propagate_logs=propagate_logs) File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/core/initialize.py", line 187, in initialize_2 config.db = getUtility(IDatabaseFactory, utility_name).create() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/mailman/database/factory.py", line 57, in create database.initialize() File "/opt/mailman3/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/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/util/deprecations.py", line 283, in warned return fn(*args, **kwargs) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/engine/create.py", line 601, in create_engine dbapi = dbapi_meth(**dbapi_args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman3/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 669, in import_dbapi import psycopg2 File "/opt/mailman3/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
Do I need to upgrade the database? If so, how do I do that?
Thanks, Lars
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to odhiambo@gmail.com