Seahub does not start anymore

After restarting my server I noticed that my seafile wasn’t starting anymore.
I decided to check the error logs and got some Database error.

I found a solution on the forums noting that 7.1 fixed the issue (I was running on 7.0.5). So I updated to 9.0.5

After updating and running the upgrade scripts I noticed some database connection errors. After fixing those by changing the open_files_limit.

So after fixing the issue I ran fsk_check, which ran successfully, but when I try to start seahub.sh I get this error:
Traceback (most recent call last):
File “/opt/seafile/seafile-server-latest/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/core/management/init.py”, line 419, in execute_from_command_line
utility.execute()
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/core/management/init.py”, line 395, in execute
django.setup()
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/apps/registry.py”, line 114, in populate
app_config.import_models()
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/apps/config.py”, line 301, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib/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 “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/contrib/sessions/models.py”, line 1, in
from django.contrib.sessions.base_session import (
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/contrib/sessions/base_session.py”, line 26, in
class AbstractBaseSession(models.Model):
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/models/base.py”, line 122, in new
new_class.add_to_class(’_meta’, Options(meta, app_label))
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/models/base.py”, line 326, in add_to_class
value.contribute_to_class(cls, name)
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/models/options.py”, line 207, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/utils/connection.py”, line 15, in getattr
return getattr(self._connections[self._alias], item)
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/utils/connection.py”, line 62, in getitem
conn = self.create_connection(alias)
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/utils.py”, line 204, in create_connection
backend = load_backend(db[‘ENGINE’])
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/utils.py”, line 111, in load_backend
return import_module(’%s.base’ % backend_name)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/backends/mysql/base.py”, line 29, in
from .introspection import DatabaseIntrospection
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/backends/mysql/introspection.py”, line 20, in
class DatabaseIntrospection(BaseDatabaseIntrospection):
File “/opt/seafile/seafile-server-latest/seahub/thirdpart/django/db/backends/mysql/introspection.py”, line 31, in DatabaseIntrospection
FIELD_TYPE.JSON: ‘JSONField’,
AttributeError: module ‘MySQLdb.constants.FIELD_TYPE’ has no attribute ‘JSON’

Were you able to fix it?
I’m currently having the same issue after upgrading to version 9