Sharepoint Plugin - Server relative urls must start with SPWeb.ServerRelativeUrl
Hi Experts,
I encountered this error message when trying to write back the results to SharePoint document library
Failed to write data : <class 'sharepoint_client.SharePointClientError'> : Error: Server relative urls must start with SPWeb.ServerRelativeUrl
I think the plugin is configured correctly as I can see the files and folders in my SharePoint document library and I can even read the data from it. It is just when I want to write back, it prompted this error message.
I used "Export to folder" recipe and linked it with the SharePoint plugin. In the SharePoint plugin, for the Path, I browsed to my intended Sharepoint document folder.
May I know where I need to fix?
Operating system used: Windows 10
Best Answer
-
Hi @akmalh_09
This is probably the reason why the writing operation is failing. To find out what the preset settings should be, you can use your web browser, log into your SharePoint and navigate to the target directory. Once reach it, the browser should have a URL in the top box looking like this:
In your preset, your should have
- the content of "3" in the "Root directory" box. 3 is the segment of the URL between /Forms and the previous /
- the content of "2" in the "Site path" box. 2 is the whole segment between 3 and the sharepoint.com/ section of the URL. It can contain one or more /