Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

Microsoft.SharePoint.SPFileLockException exception

Open jbatra-umeey opened this issue 2 years ago • 2 comments

I am trying to upload an Excel file that is ready open in the SharePoint browser. Is there any way I can bypass this shared lock and do a force update to the file

Stack-trace

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/office365/runtime/client_request.py", line 62, in execute_query raise ClientRequestException(*e.args, response=e.response) office365.runtime.client_request_exception.ClientRequestException: ('-2147018894, Microsoft.SharePoint.SPFileLockException', 'The file https://tenant.sharepoint.com/sites/PsX-India/Shared Documents/XCUITest-Automation/PSX-Xcuitest.xlsx is locked for shared use by xxx [membership].', "423 Client Error: Locked for url: https://tenant.sharepoint.com/sites/PsX-India/_api/Web/getFolderByServerRelativeUrl('%2Fsites%2FPsX-India%2FShared%20Documents%2FXCUITest-Automation%2F')/Files/add(overwrite=true,url='PSX-Xcuitest.xlsx')")

jbatra-umeey avatar Jun 21 '23 10:06 jbatra-umeey

Has anyone found a way to handle this problem?

RayenSO avatar Aug 25 '23 12:08 RayenSO

Anyone know the solution for this problem?

zhixuanyeap avatar Aug 30 '23 06:08 zhixuanyeap