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

Copy_to_using_path not working

Open shinenazeer opened this issue 3 years ago • 1 comments

source_folder_url = "/sites/sitename/Shared Documents/old/1"
target_folder_url = "/sites/sitename/Shared Documents/new"

source_folder = ctx.web.get_folder_by_server_relative_url(source_folder_url)
target_folder = source_folder.copy_to_using_path(target_folder_url,True).get().execute_query()
print(f"File copied into {target_folder.serverRelativeUrl}")

Showing error: requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://domain.sharepoint.com/sites/sitename/_api/Web/getFolderByServerRelativePath(DecodedUrl=%7B'DecodedUrl':%20'/sites/sitename/Shared%20Documents/new'%7D)

shinenazeer avatar Jun 24 '22 05:06 shinenazeer

someone please help

shinenazeer avatar Jul 01 '22 09:07 shinenazeer

I confirm it was a bug with Folder.copy_to_using_path method, thank you for reporting it. It has been resolved in 2.3.14 version

vgrem avatar Sep 07 '22 21:09 vgrem