-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse fails to start with ModuleNotFoundError after upgrading to 1.60.0 when python module sqlite3 is not installed #12962
Comments
Looks like this is the result of changes in https://github.com/matrix-org/synapse/pull/12734/files#. @DMRobertson any thoughts on the most graceful way to handle this? |
I didn't know that some distributions of Python don't have sqlite3 available. It seems that we are doomed to repeat ourselves, c.f. #7127. The easiest fix is probably to move the imports synapse/synapse/storage/engines/__init__.py Lines 17 to 18 in 1fe202a
into their respective branches: synapse/synapse/storage/engines/__init__.py Lines 24 to 28 in 1fe202a
As a bonus, that would hopefully allow us to import |
Sorry @H-Shay, I think I gave you bad advice here. I forgot that we import the DatabaseEngines all over the place and use them in Three options spring to mind:
My preferences would be 2 > 1 > 3. |
You're welcome, thank you for the quick fix. I'll check once |
@DMRobertson: Fixed with |
Many thanks for confirming @joh-ku! |
Description
After upgrading from
v1.59.1
tov1.60.0
synapse fails to start with aModuleNotFoundError: No module named '_sqlite3'
even if PostgreSQL is being used. I didn't find any hint in the release notes that this behaviour is expected.I found a related bug report documented in #7127 and #7155.
Trace
Steps to reproduce
pip install -U matrix-synapse
Fix
Manual installation of databases/py-sqlite3, which is not part of the base port lang/python39, solves the issue.
(Rolling back with
pip install matrix-synapse==1.59.1
also solves the issue.)Version information
Version:
Homeserver running on
v1.59.1
trying an upgrade tov1.60.0
Platform:
Python 3.9.13
PostgreSQL 13.7
FreeBSD 13.1-RELEASE
The text was updated successfully, but these errors were encountered: