SharePlum 错误:“无法获取用户信息列表" [英] SharePlum error : "Can't get User Info List"

查看:63
本文介绍了SharePlum 错误:“无法获取用户信息列表"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 SharePlum,它是 SharePoint 的 Python 模块但是当我尝试连接到我的 SharePoint 时,SharePlum 会引发此错误:

<块引用>

回溯(最近一次调用最后一次):
文件C:/Users/me/Desktop/Sharpoint/sharpoint.py",第 13 行,在 site = Site(sharepoint_url, auth=auth)
文件C:\Users\me\AppData\Local\Programs\Python\Python36\lib\site-packages\shareplum\shareplum.py",第 46 行,init self.users = self.获取用户()
文件C:\Users\me\AppData\Local\Programs\Python\Python36\lib\site-packages\shareplum\shareplum.py",第 207 行,在 GetUsers 中引发异常(无法获取用户信息列表")
异常:无法获取用户信息列表

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

auth = HttpNtlmAuth(用户名,密码)站点 = 站点(sharepoint_url,auth=auth)

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

解决方案

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

为什么要精确地移除这部分?
事实上,当您在 Sharepoint 中深入到足够深时,您的 url 将类似于:https://www.mysharepoint.com/Your/SharePoint/DocumentLibrary/Forms/AllItems.aspx?RootFolder=%2FYour%2FSharePoint%2DocumentLibrary%2FmyPersonnalFolder&FolderCTID=0x0120008BBC54784D92004D1E23F557873CC707&View=%7BE149526D%2DFD1B%2D4BFA%2DAA20code>%7D7Dp72

您可以看到路径的右侧在 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 的人可以确认一下吗?

I'm trying to use SharePlum which is a Python module for SharePoint but when I try to connect to my SharePoint, SharePlum raises me this error:

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

Here is the very short code that I have written:

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

This error seems to indicate bad username/password but I'm pretty sure that the one I have are correct...

解决方案

Ok, it seems that I found the solution for my problem, it's about the Sharepoint URL that I gave. If we take this example : https://www.mysharepoint.com/Your/SharePoint/DocumentLibrary
You have to remove the last part : /DocumentLibrary.

Why remove this part precisely ?
In fact, when you go deep enough in your Sharepoint, your url will look like something like : https://www.mysharepoint.com/Your/SharePoint/DocumentLibrary/Forms/AllItems.aspx?RootFolder=%2FYour%2FSharePoint%2DocumentLibrary%2FmyPersonnalFolder&FolderCTID=0x0120008BBC54784D92004D1E23F557873CC707&View=%7BE149526D%2DFD1B%2D4BFA%2DAA46%2D90DE0770F287%7D

You can see that the right of the path is in RootFolder=%2FYour%2FSharePoint%2DocumentLibrary%2Fmy%20personnal%20folder and not in the "normal" URL anymore (if it were, it will be like that https://www.mysharepoint.com/Your/SharePoint/DocumentLibrary/myPersonnalFolder/).

What you have to remove is the end of the "normal" URL so in this case, /DocumentLibrary.

So my correct Sharepoint URL to input in SharePlum will be https://www.mysharepoint.com/Your/SharePoint/

I'm pretty new to Sharepoint so I'm not really sure that this I the right answer to this problem for the others persons, may someone who know Sharepoint better than me can confirm ?

这篇关于SharePlum 错误:“无法获取用户信息列表"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆