![](/img/trans.png)
[英]Possible to mock function such that one parameter is always set to a specified value?
[英]Specified value is not supported for the serverRelativePath parameter
我正在努力使用 SharepointAPI 從這樣的公司 url 下載文件
sharepoint_url = "https://mysite.sharepoint.com/sites/personalsite" sharepoint_path = "/sites/mysite/Shared/General/Data/Datafile.txt"
但不斷收到此錯誤:office365.runtime.client_request_exception.ClientRequestException: ('-2147024809, System.ArgumentException', "serverRelativeUrl\r\nParameter name: serverRelativePath 參數不支持指定的值。", "400 Client Error: Bad請求url: https://mysite.sharepoint.com/sites/personalsite/_api/Web/getFileByServerRelativeUrl('https:%2F%2Fmysite.sharepoint.com%2Fsites%2Fpersonalsite')?$select="Server
所以我不知道該怎么做,我在 Python 中使用它
嘗試對 API 和文件使用相同的站點:
sharepoint_url = "https://mysite.sharepoint.com/sites/mysite"
sharepoint_path = "/sites/mysite/Shared/General/Data/Datafile.txt"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.