升级后一直报错
2024-07-03 09:23:30,481 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 244, in _legacy_get_response
response = middleware_method(request)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/middleware/locale.py”, line 24, in process_request
i18n_patterns_used, prefixed_default_language = is_language_prefix_patterns_used(urlconf)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/conf/urls/i18n.py”, line 29, in is_language_prefix_patterns_used
for url_pattern in get_resolver(urlconf).url_patterns:
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/utils/functional.py”, line 35, in get
res = instance.dict[self.name] = self.func(instance)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/urls/resolvers.py”, line 407, in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/utils/functional.py”, line 35, in get
res = instance.dict[self.name] = self.func(instance)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/urls/resolvers.py”, line 400, in urlconf_module
return import_module(self.urlconf_name)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/kfs/seafile/seafile-server-7.1.5/seahub/seahub/utils/rooturl.py”, line 41, in
url(r’^%s’ % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/conf/urls/init.py”, line 50, in include
urlconf_module = import_module(urlconf_module)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/kfs/seafile/seafile-server-7.1.5/seahub/seahub/urls.py”, line 600, in
url(r’^captcha/‘, include(‘captcha.urls’)),
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/conf/urls/init.py”, line 50, in include
urlconf_module = import_module(urlconf_module)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/usr/local/lib/python3.6/site-packages/captcha/urls.py”, line 1, in
from django.urls import re_path
ImportError: cannot import name ‘re_path’
2024-07-03 09:23:32,102 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /favicon.ico
Traceback (most recent call last):
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 244, in _legacy_get_response
response = middleware_method(request)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/middleware/locale.py”, line 24, in process_request
i18n_patterns_used, prefixed_default_language = is_language_prefix_patterns_used(urlconf)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/conf/urls/i18n.py”, line 29, in is_language_prefix_patterns_used
for url_pattern in get_resolver(urlconf).url_patterns:
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/utils/functional.py”, line 35, in get
res = instance.dict[self.name] = self.func(instance)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/urls/resolvers.py”, line 407, in url_patterns
patterns = getattr(self.urlconf_module, “urlpatterns”, self.urlconf_module)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/utils/functional.py”, line 35, in get
res = instance.dict[self.name] = self.func(instance)
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/urls/resolvers.py”, line 400, in urlconf_module
return import_module(self.urlconf_name)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/kfs/seafile/seafile-server-7.1.5/seahub/seahub/utils/rooturl.py”, line 41, in
url(r’^%s’ % settings.SITE_ROOT[1:], include(settings.SITE_ROOT_URLCONF)),
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/conf/urls/init.py”, line 50, in include
urlconf_module = import_module(urlconf_module)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/kfs/seafile/seafile-server-7.1.5/seahub/seahub/urls.py”, line 600, in
url(r’^captcha/', include(‘captcha.urls’)),
File “/kfs/seafile/seafile-server-7.1.5/seahub/thirdpart/django/conf/urls/init.py”, line 50, in include
urlconf_module = import_module(urlconf_module)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/usr/local/lib/python3.6/site-packages/captcha/urls.py”, line 1, in
from django.urls import re_path
ImportError: cannot import name ‘re_path’
缺失这个依赖,但是我在python命令行中运行from django.urls import re_path是没有问题的