seafile-monitor.sh no python venv
Ryszard-Trojnacki opened this issue · comments
I'm running Seafile 11.0.3 community edition on Debian 12 (Bookworm) and everything was ok after configuring python venv which is required in Debian 12.
What thing that didn't work is seafile-monitor.sh
script logs this error every 30 seconds:
[2024-01-14 21:10:52] Start seafevents.main
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/seafile/seafile-server-11.0.3/pro/python/seafevents/main.py", line 6, in <module>
from seafevents.db import create_db_tables, prepare_db_tables
File "/home/seafile/seafile-server-11.0.3/pro/python/seafevents/db.py", line 7, in <module>
from sqlalchemy import create_engine
ModuleNotFoundError: No module named 'sqlalchemy'
I have checked if sqlalchemy
is installed and it is, but the problem is with seafile-monitor.sh :
function start_seafevents() {
/usr/bin/python3 -m seafevents.main --config-file ${central_config_dir}/seafevents.conf --logfile ${TOPDIR}/logs/seafevents.log -P ${TOPDIR}/pids/seafevents.pid &
sleep 1
}
This function just calls the system python (/usr/bin/python3
) and not the configured with venv.
For me, changing this just to $PYTHON
helped becuase it is using correct version of python, but it should be propably done same way as it is in other scripts (seahub.sh).
Of course I'm settings variable $PYTHON
to valid python from venv to be used in other scripts (this is missing in documentation).
Hello
I confirm this trouble. I've updated to debian bookworm and gitea 11.0.5 and we get same error in our log.
Thanks
The fix will be included in the next release.