SQLAlchemy + MySQL-python + seahub related problem

from a few days ago, my lab mate reported to me that “I cannot create library anymore!” and,
I found below log from our seafile server.

2017-09-20 16:39:58,664 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /ajax/repo/97a215b8-eedc-4abb-8cd9-98ce71f7c5c0/remove/
Traceback (most recent call last):
File “/var/lib/seafile/seafile-pro-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 “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/seahub/auth/decorators.py”, line 69, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/seahub/base/decorators.py”, line 81, in decorated
return func(request, *args, **kwargs)
File “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/seahub/views/ajax.py”, line 1468, in repo_remove
repo_name=repo.name)
File “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/dispatch/dispatcher.py”, line 189, in send
response = receiver(signal=self, sender=sender, **named)
File “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/seahub/handlers.py”, line 61, in repo_deleted_cb
seafevents.save_user_events (session, etype, detail, users, None)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/seafevents/events/db.py”, line 96, in save_user_events
return _save_user_events(session, -1, etype, detail, usernames, timestamp)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/seafevents/events/db.py”, line 86, in save_user_events
user_event = UserEvent(org_id, username, event.uuid)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/SQLAlchemy-0.8.1-py2.6-linux-x86_64.egg/sqlalchemy/orm/attributes.py”, line 316, in get
return self.impl.get(instance_state(instance), dict
)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/SQLAlchemy-0.8.1-py2.6-linux-x86_64.egg/sqlalchemy/orm/attributes.py”, line 627, in get
“correctly” % key)
KeyError: “Deferred loader for attribute ‘uuid’ failed to populate correctly”
2017-09-20 16:49:10,084 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “/var/lib/seafile/seafile-pro-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 “/var/lib/seafile/seafile-pro-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 “/var/lib/seafile/seafile-pro-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 “/var/lib/seafile/seafile-pro-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 “/var/lib/seafile/seafile-pro-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 “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/seahub/api2/views.py”, line 736, in post
repo_name=repo_name)
File “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/dispatch/dispatcher.py”, line 189, in send
response = receiver(signal=self, sender=sender, **named)
File “/var/lib/seafile/seafile-pro-server-5.1.3/seahub/seahub/handlers.py”, line 33, in repo_created_cb
seafevents.save_user_events (session, etype, detail, users, None)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/seafevents/events/db.py”, line 96, in save_user_events
return _save_user_events(session, -1, etype, detail, usernames, timestamp)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/seafevents/events/db.py”, line 86, in save_user_events
user_event = UserEvent(org_id, username, event.uuid)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/SQLAlchemy-0.8.1-py2.6-linux-x86_64.egg/sqlalchemy/orm/attributes.py”, line 316, in get
return self.impl.get(instance_state(instance), dict
)
File “/var/lib/seafile/seafile-pro-server-5.1.3/pro/python/SQLAlchemy-0.8.1-py2.6-linux-x86_64.egg/sqlalchemy/orm/attributes.py”, line 627, in get
“correctly” % key)
KeyError: “Deferred loader for attribute ‘uuid’ failed to populate correctly”

I don’t have idea where it comes from, could someone guess why it printed?
I have installed python 2.7.13 and I have installed additional things by pip

Django (1.11.4)
MySQL-python (1.2.5)
olefile (0.44)
pathlib2 (2.3.0)
Pillow (4.2.1)
pip (9.0.1)
pytz (2017.2)
scandir (1.5)
setuptools (36.4.0)
six (1.10.0)
SQLAlchemy (1.1.14)
urllib3 (1.22)
wheel (0.29.0)

Our seafile server seems to be almost broken … humm …

You have pro, hence support. I suggest you contact the seafile team via email.