7.0.5升级7.1.5,seahub启动卡死,无法启动

系统centos7
按照升级说明,解决了phthon环境依赖,但是无法启动seahub,请指教,谢谢。

Starting seahub at port 8000 …
[2021-10-31 05:32:43 +0000] [2285] [INFO] Starting gunicorn 20.0.4
[2021-10-31 05:32:43 +0000] [2285] [INFO] Listening at: http://0.0.0.0:8000 (2285)
[2021-10-31 05:32:43 +0000] [2285] [INFO] Using worker: sync
[2021-10-31 05:32:43 +0000] [2289] [INFO] Booting worker with pid: 2289
[2021-10-31 05:32:43 +0000] [2290] [INFO] Booting worker with pid: 2290
[2021-10-31 05:32:43 +0000] [2291] [INFO] Booting worker with pid: 2291
[2021-10-31 05:32:43 +0000] [2292] [INFO] Booting worker with pid: 2292
[2021-10-31 05:32:43 +0000] [2293] [INFO] Booting worker with pid: 2293
^C[2021-10-31 05:33:05 +0000] [2285] [INFO] Handling signal: int
[2021-10-31 05:33:05 +0000] [2293] [INFO] Worker exiting (pid: 2293)
[2021-10-31 05:33:05 +0000] [2291] [INFO] Worker exiting (pid: 2291)
[2021-10-31 05:33:05 +0000] [2289] [INFO] Worker exiting (pid: 2289)
[2021-10-31 05:33:05 +0000] [2290] [INFO] Worker exiting (pid: 2290)
[2021-10-31 05:33:05 +0000] [2292] [INFO] Worker exiting (pid: 2292)
[2021-10-31 05:33:05 +0000] [2285] [INFO] Shutting down: Master
^C

查看seahub.log
[root@localhost logs]# cat seahub.log
2021-10-31 04:59:20,279 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/home/filescloud/seafile-server-7.1.5/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 505, in dispatch
response = self.handle_exception(exc)
File “/home/filescloud/seafile-server-7.1.5/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 465, in handle_exception
self.raise_uncaught_exception(exc)
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 476, in raise_uncaught_exception
raise exc
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 502, in dispatch
response = handler(request, *args, **kwargs)
File “/home/filescloud/seafile-server-7.1.5/seahub/seahub/api2/views.py”, line 343, in get
return Response(self._get_account_info(request))
File “/home/filescloud/seafile-server-7.1.5/seahub/seahub/api2/views.py”, line 317, in _get_account_info
url, _, _ = api_avatar_url(email, int(72))
File “/home/filescloud/seafile-server-7.1.5/seahub/seahub/avatar/util.py”, line 42, in cached_func
return cache.get(key) or cache_set(key, func(user, size))
File “/home/filescloud/seafile-server-7.1.5/seahub/thirdpart/django/core/cache/backends/filebased.py”, line 41, in get
return pickle.loads(zlib.decompress(f.read()))
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 1: ordinal not in range(128)

已经解决,在usr/lib/python3.6/site-packages/下新建文件sitecustomize.py
文件中写入
import sys
sys.setdefaultencoding(‘utf-8’)
保存退出即可