Cannot import name 'user_deleted' from 'registration.signals'

Hi,

I’m getting the following error when calling python3.9 manage.py migrate

$ python3.9 manage.py migrate

Warning: File comment has changed since version 6.3, while table base_filecomment is not migrated yet, please consider migrate it according to v6.3.0 release note, otherwise the file comment feature will not work correctly.

Traceback (most recent call last):
File “/home/seafile/seafile-server-8.0.5/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/management/init.py”, line 381, in execute_from_command_line
utility.execute()
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/management/init.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/management/base.py”, line 323, in run_from_argv
self.execute(*args, **cmd_options)
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/management/base.py”, line 361, in execute
self.check()
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/management/base.py”, line 387, in check
all_issues = self._run_checks(
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/management/commands/migrate.py”, line 65, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/management/base.py”, line 377, in _run_checks
return checks.run_checks(**kwargs)
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/checks/registry.py”, line 72, in run_checks
new_errors = check(app_configs=app_configs)
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/checks/urls.py”, line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File “/home/seafile/.local/lib/python3.9/site-packages/django/core/checks/urls.py”, line 57, in _load_all_namespaces
url_patterns = getattr(resolver, ‘url_patterns’, [])
File “/home/seafile/.local/lib/python3.9/site-packages/django/utils/functional.py”, line 80, in get
res = instance.dict[self.name] = self.func(instance)
File “/home/seafile/.local/lib/python3.9/site-packages/django/urls/resolvers.py”, line 584, in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module)
File “/home/seafile/.local/lib/python3.9/site-packages/django/utils/functional.py”, line 80, in get
res = instance.dict[self.name] = self.func(instance)
File “/home/seafile/.local/lib/python3.9/site-packages/django/urls/resolvers.py”, line 577, in urlconf_module
return import_module(self.urlconf_name)
File “/usr/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/home/seafile/seafile-server-8.0.5/seahub/seahub/utils/rooturl.py”, line 41, in
url(r’^%s’ % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
File “/home/seafile/.local/lib/python3.9/site-packages/django/urls/conf.py”, line 34, in include
urlconf_module = import_module(urlconf_module)
File “/usr/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/home/seafile/seafile-server-8.0.5/seahub/seahub/urls.py”, line 17, in
from seahub.views.repo import repo_history_view, repo_snapshot, view_shared_dir,
File “/home/seafile/seafile-server-8.0.5/seahub/seahub/views/repo.py”, line 38, in
from seahub.api2.endpoints.group_owned_libraries import get_group_id_by_repo_owner
File “/home/seafile/seafile-server-8.0.5/seahub/seahub/api2/endpoints/group_owned_libraries.py”, line 19, in
from seahub.api2.authentication import TokenAuthentication
File “/home/seafile/seafile-server-8.0.5/seahub/seahub/api2/authentication.py”, line 10, in
from seahub.auth.models import AnonymousUser
File “/home/seafile/seafile-server-8.0.5/seahub/seahub/auth/models.py”, line 191, in
from registration.signals import user_deleted
ImportError: cannot import name ‘user_deleted’ from ‘registration.signals’ (/home/seafile/.local/lib/python3.9/site-packages/registration/signals.py)

Does someone have an idea how to solve the problem?