WEB显示红色字体错误/客户端提示服务器内部错误

seahub_django_request的日志
2016-12-17 16:22:34,355 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\django-1.8.10-py2.7.egg\django\core\handlers\base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\django-1.8.10-py2.7.egg\django\views\decorators\csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\django-1.8.10-py2.7.egg\django\views\generic\base.py”, line 71, in view
return self.dispatch(request, *args, **kwargs)
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 463, in dispatch
response = handler(request, *args, **kwargs)
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\seahub\api2\views.py”, line 426, in get
“mtime_relative”: translate_seahub_time(r.last_modify),
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\seahub\base\templatetags\seahub_tags.py”, line 307, in translate_seahub_time
titletime = DateFormat(val).format(‘r’)
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\django-1.8.10-py2.7.egg\django\utils\dateformat.py”, line 54, in init
self.timezone = get_default_timezone()
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\django-1.8.10-py2.7.egg\django\utils\lru_cache.py”, line 125, in wrapper
result = user_function(*args, **kwds)
File “C:\SeafileProgram\seafile-server_5.1.3_win32\seafile-server-5.1.3\seahub\thirdpart\django-1.8.10-py2.7.egg\django\utils\timezone.py”, line 177, in get_default_timezone
return pytz.timezone(settings.TIME_ZONE)
File “build\bdist.win32\egg\pytz_init_.py”, line 180, in timezone
raise UnknownTimeZoneError(zone)
UnknownTimeZoneError: ‘Asia/Shanghai’

seafile日志
[12/17/16 10:44:41] …/common/mq-mgr.c(60): [mq client] mq cilent is started
[12/17/16 10:44:41] …/common/mq-mgr.c(106): [mq mgr] publish to hearbeat mq: seaf_server.heartbeat
[12/17/16 10:44:41] listen-mgr.c(120): listen on port 12001 for block tranfer
[12/17/16 14:52:22] read from connfd error: No error.
[12/17/16 14:52:23] …/common/mq-mgr.c(60): [mq client] mq cilent is started
[12/17/16 14:52:23] …/common/mq-mgr.c(106): [mq mgr] publish to hearbeat mq: seaf_server.heartbeat
[12/17/16 14:52:23] listen-mgr.c(120): listen on port 12001 for block tranfer
[12/17/16 15:10:21] read from connfd error: No error.
[12/17/16 15:10:22] …/common/mq-mgr.c(60): [mq client] mq cilent is started
[12/17/16 15:10:22] …/common/mq-mgr.c(106): [mq mgr] publish to hearbeat mq: seaf_server.heartbeat
[12/17/16 15:10:22] listen-mgr.c(120): listen on port 12001 for block tranfer
[12/17/16 15:10:37] read from connfd error: No error.
[12/17/16 15:10:38] …/common/mq-mgr.c(60): [mq client] mq cilent is started
[12/17/16 15:10:38] …/common/mq-mgr.c(106): [mq mgr] publish to hearbeat mq: seaf_server.heartbeat
[12/17/16 15:10:38] listen-mgr.c(120): listen on port 12001 for block tranfer
[12/17/16 15:35:26] …/common/mq-mgr.c(60): [mq client] mq cilent is started
[12/17/16 15:35:26] …/common/mq-mgr.c(106): [mq mgr] publish to hearbeat mq: seaf_server.heartbeat
[12/17/16 15:35:27] listen-mgr.c(120): listen on port 12001 for block tranfer

https://forum.seafile.com/t/corrupted-5-1-3-libraries-after-power-failure/223/4

看看这里的解决办法

大神你好,我就是看了里面的没有解决才发帖的,不管是删除seahub_cache这个目录下的临时文件还是删除seahub_settings.pyc这个都不管用,重启了也没有用。

大神你好,麻烦你帮忙看看啊,客户端WEB,服务器WEB都是同样的问题。谢谢了!

升级到 Python to 2.7.11

在 seahub_settings.py 加上:

TIME_ZONE = 'UTC'

记得重启。