Base-Overview throws Error after Update to SeaTable 4.2 if department function was activated before

Dear SeaTable Admins,

The problem:

Do you run your own SeaTable Server and after an update to version 4.2 you only get an “Error” on the homepage of SeaTable?


Then it might be the problem, that you activated departments anytime in the past, and now you have this configuration problem.

Look for the errors:

Open the dtable_web.log with, for example the command fail -f dtable_web.log and see if this error occurs if you open the homepage of SeaTable with your browser. If you see this error message, your ran into this problem:

2023-11-23 13:23:06,659 [ERROR] django.request:224 log_response Internal Server Error: /api/v2.1/workspaces/
Traceback (most recent call last):
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/handlers/", line 47, in inner
    response = get_response(request)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/handlers/", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/views/decorators/", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/views/generic/", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/rest_framework/", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/rest_framework/", line 469, in handle_exception
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/rest_framework/", line 480, in raise_uncaught_exception
    raise exc
  File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/rest_framework/", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/opt/seatable/seatable-server-latest/dtable-web/seahub/api2/endpoints/", line 128, in get
    department_v2_groups = get_department_v2_groups_by_user(username).select_related('department')
  File "/opt/seatable/seatable-server-latest/dtable-web/seahub/department_v2/", line 20, in get_department_v2_groups_by_user
    for department_id in DepartmentsV2.objects.get_ancestor_departments_ids(department):
  File "/opt/seatable/seatable-server-latest/dtable-web/seahub/department_v2/", line 19, in get_ancestor_departments_ids
    for dep_id in department.path.strip('/').split('/'):
AttributeError: 'NoneType' object has no attribute 'strip'

The solution

Open your and comment or remove these two entries.


Alternatively, you can set both values to False.

Then restart SeaTable with restart and the problem will be resolved.

1 Like