Error locking file


I need help with file locking.

I am using seafile server 7.0.5 on linux and Seafile client 7.0.6 on windows

The following is what the server log shows when I try to lock a file using on windows > seafile contextual menu > lock this file

2020-03-09 02:24:42,322 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api2/repos/8d73cd63-fdf4-4d11-ba32-7ac149e1515a/file/
Traceback (most recent call last):
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/”, line 41, in inner
response = get_response(request)
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/django/views/decorators/”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/django/views/generic/”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/media/respaldos/seafile-server-7.0.5/seahub/seahub/api2/”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/rest_framework/”, line 466, in dispatch
response = self.handle_exception(exc)
File “/media/respaldos/seafile-server-7.0.5/seahub/seahub/api2/”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/media/respaldos/seafile-server-7.0.5/seahub/thirdpart/rest_framework/”, line 463, in dispatch
response = handler(request, *args, **kwargs)
File “/media/respaldos/seafile-server-7.0.5/seahub/seahub/api2/”, line 3042, in put
seafile_api.lock_file(repo_id, path.lstrip(‘/’), username, expire)
AttributeError: ‘SeafileAPI’ object has no attribute ‘lock_file’

And this is what my client shows:


How can I fix this? I checked the SeafileAPI class and indeed doesnt have a lock_file attribute or method.


Do you use Seafile CE or PE? File locking is a feature exclusive to Seafile PE:

1 Like

Thank you for that, I am using CE. Sorry for this dumb question. :cold_sweat: