While trying to generate a share link to a folder in my self-hosted Seafile, I get an “Error” popup with no further information. The seahub log shows the traceback below.
I recently upgrade from version 10 to 12.0.14, and at the same time converted from SQLite to MySQL. Did something go wrong in the database conversion?
[2025-08-26 15:14:33] [ERROR] django.request:241 log_response Internal Server Error: /api/v2.1/multi-share-links/
Traceback (most recent call last):
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/backends/mysql/base.py", line 75, in execute
return self.cursor.execute(query, args)
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 320, in _query
self._do_get_result(db)
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 145, in _do_get_result
self._result = result = self._get_result()
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 352, in _get_result
return self._get_db().store_result()
MySQLdb.DataError: (1406, "Data too long for column 'token' at row 1")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/seahub/share/decorators.py", line 128, in _decorated
return func(view, request, *args, **kwargs)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/seahub/api2/endpoints/multi_share_links.py", line 257, in post
fs = FileShare.objects.create_dir_link(username, repo_id, path,
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/seahub/share/models.py", line 208, in create_dir_link
return self._add_file_share(username, repo_id, path, 'd', password,
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/seahub/share/models.py", line 150, in _add_file_share
fs = super(FileShareManager, self).create(
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/query.py", line 658, in create
obj.save(force_insert=True, using=self.db)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/base.py", line 814, in save
self.save_base(
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/base.py", line 877, in save_base
updated = self._save_table(
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/base.py", line 1020, in _save_table
results = self._do_insert(
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/base.py", line 1061, in _do_insert
return manager._insert(
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/query.py", line 1805, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/models/sql/compiler.py", line 1822, in execute_sql
cursor.execute(sql, params)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/home/seafile/seafile/seafile-server-12.0.14/seahub/thirdpart/django/db/backends/mysql/base.py", line 75, in execute
return self.cursor.execute(query, args)
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 320, in _query
self._do_get_result(db)
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 145, in _do_get_result
self._result = result = self._get_result()
File "/home/seafile/env/lib/python3.10/site-packages/MySQLdb/cursors.py", line 352, in _get_result
return self._get_db().store_result()
django.db.utils.DataError: (1406, "Data too long for column 'token' at row 1")