used Version: Seafile community edition 9.0.4
OS: Arch Linux
python: 3.10
python-django: 3.2.10-1
Hello!
After an update from 8.0.8 to 9.0.4, my Seahub no longer starts. I get the following error message:
[seafile@banane seahub]$ pwd
/opt/seafile/private/seafile-server-latest/seahub
[seafile@banane seahub]$ python3 manage.py runserver
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python3.10/site-packages/django/core/management/commands/runserver.py", line 61, in execute
super().execute(*args, **options)
File "/usr/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/usr/lib/python3.10/site-packages/django/core/management/commands/runserver.py", line 68, in handle
if not settings.DEBUG and not settings.ALLOWED_HOSTS:
File "/usr/lib/python3.10/site-packages/django/conf/__init__.py", line 82, in __getattr__
self._setup(name)
File "/usr/lib/python3.10/site-packages/django/conf/__init__.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python3.10/site-packages/django/conf/__init__.py", line 170, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/seafile/private/seafile-server-9.0.4/seahub/seahub/__init__.py", line 4, in <module>
from .handlers import repo_created_cb, repo_deleted_cb, clean_up_repo_trash_cb, \
File "/opt/seafile/private/seafile-server-9.0.4/seahub/seahub/handlers.py", line 4, in <module>
from . import settings
File "/opt/seafile/private/seafile-server-9.0.4/seahub/seahub/settings.py", line 9, in <module>
from seaserv import FILE_SERVER_PORT
ModuleNotFoundError: No module named 'seaserv'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/seafile/private/seafile-server-9.0.4/seahub/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python3.10/site-packages/django/core/management/base.py", line 367, in run_from_argv
connections.close_all()
File "/usr/lib/python3.10/site-packages/django/db/utils.py", line 208, in close_all
for alias in self:
File "/usr/lib/python3.10/site-packages/django/utils/connection.py", line 73, in __iter__
return iter(self.settings)
File "/usr/lib/python3.10/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/lib/python3.10/site-packages/django/utils/connection.py", line 45, in settings
self._settings = self.configure_settings(self._settings)
File "/usr/lib/python3.10/site-packages/django/db/utils.py", line 144, in configure_settings
databases = super().configure_settings(databases)
File "/usr/lib/python3.10/site-packages/django/utils/connection.py", line 50, in configure_settings
settings = getattr(django_settings, self.settings_name)
File "/usr/lib/python3.10/site-packages/django/conf/__init__.py", line 82, in __getattr__
self._setup(name)
File "/usr/lib/python3.10/site-packages/django/conf/__init__.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python3.10/site-packages/django/conf/__init__.py", line 170, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/seafile/private/seafile-server-9.0.4/seahub/seahub/__init__.py", line 4, in <module>
from .handlers import repo_created_cb, repo_deleted_cb, clean_up_repo_trash_cb, \
File "/opt/seafile/private/seafile-server-9.0.4/seahub/seahub/handlers.py", line 4, in <module>
from . import settings
File "/opt/seafile/private/seafile-server-9.0.4/seahub/seahub/settings.py", line 9, in <module>
from seaserv import FILE_SERVER_PORT
ModuleNotFoundError: No module named 'seaserv'
The seaserv module you are looking for is available, see below:
[seafile@banane private]$ ls -l seafile-server-9.0.4/seafile/lib/python3/site-packages/seaserv/
insgesamt 84
-rw-r--r-- 1 seafile seafile 47855 21. Feb 03:05 api.py
-rw-r--r-- 1 seafile seafile 2302 21. Feb 03:05 __init__.py
drwxr-xr-x 2 seafile seafile 4096 12. Mär 19:42 __pycache__
-rw-r--r-- 1 seafile seafile 25840 21. Feb 03:05 service.py
The correct search path is also in seahub.sh, see below:
[seafile@banane private]$ grep PYTHONPATH seafile-server-latest/seahub.sh
function prepare_env() {
...
export PYTHONPATH=${INSTALLPATH}/seafile/lib/python3/site-packages:${INSTALLPATH}/seafile/lib/python3/site-packages:${INSTALLPATH}/seahub:${INSTALLPATH}/seahub/thirdpart:$PYTHONPATH
...
}
Does anyone have any idea how to bring the service back to life?
And sry for my english
Thanks a lot.