gpt4 book ai didi

python - SharePlum错误: "Can' t get User Info List"

转载 作者:太空狗 更新时间:2023-10-29 17:50:07 28 4
gpt4 key购买 nike

我正在尝试使用 SharePlum这是一个用于 SharePoint 的 Python 模块,但是当我尝试连接到我的 SharePoint 时,SharePlum 向我提出了这个错误:

Traceback (most recent call last):
File "C:/Users/me/Desktop/Sharpoint/sharpoint.py", line 13, in site = Site(sharepoint_url, auth=auth)
File "C:\Users\me\AppData\Local\Programs\Python\Python36\lib\site-packages\shareplum\shareplum.py", line 46, in init self.users = self.GetUsers()
File "C:\Users\me\AppData\Local\Programs\Python\Python36\lib\site-packages\shareplum\shareplum.py", line 207, in GetUsers raise Exception("Can't get User Info List")
Exception: Can't get User Info List

这是我写的非常短的代码:

auth = HttpNtlmAuth(username, password)  
site = Site(sharepoint_url, auth=auth)

这个错误似乎表明用户名/密码错误,但我很确定我的用户名/密码是正确的...

最佳答案

好的,看来我找到了问题的解决方案,它与我提供的 Sharepoint URL 有关。如果我们以这个例子为例:https://www.mysharepoint.com/Your/SharePoint/DocumentLibrary
您必须删除最后一部分:/DocumentLibrary

为什么要精确删除这部分?
事实上,当您深入了解 Sharepoint 时,您的网址将类似于:https://www.mysharepoint.com/Your/SharePoint/DocumentLibrary/Forms/AllItems.aspx?RootFolder=%2FYour% 2FSharePoint%2DocumentLibrary%2FmyPersonnalFolder&FolderCTID=0x0120008BBC54784D92004D1E23F557873CC707&View=%7BE149526D%2DFD1B%2D4BFA%2DAA46%2D90DE0770F287%7D

您可以看到路径右侧位于 RootFolder=%2FYour%2FSharePoint%2DocumentLibrary%2Fmy%20personnal%20folder 而不是“普通”URL(如果是的话,它会像那样 https://www.mysharepoint.com/Your/SharePoint/DocumentLibrary/myPersonnalFolder/)。

您必须删除的是“正常”URL 的末尾,因此在本例中为 /DocumentLibrary

所以我在 SharePlum 中输入的正确 Sharepoint URL 将是 https://www.mysharepoint.com/Your/SharePoint/

我是 Sharepoint 的新手,所以我不确定这对其他人来说是否是这个问题的正确答案,比我更了解 Sharepoint 的人可以确认一下吗?

关于python - SharePlum错误: "Can' t get User Info List",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45568823/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com