03-10-2022 07:41 AM
Hello,
I am trying to download lists from SharePoint into a pandas dataframe. However I cannot get any information successfully. I have attempted many solution mentioned in stackoverflow. Below is one of those attempts:
# https://pypi.org/project/sharepoint/
from sharepoint import SharePointSite, basic_auth_opener
server_url = "https://teamup.<company_name>.com/"
site_url = server_url + "sites/pt/service/metrics/sitedata/"
opener = basic_auth_opener(server_url, username, password)
site = SharePointSite(site_url, opener)
When the following code is executed I am getting an error:
for sp_list in site.lists:
print(sp_list.id, sp_list.meta['Title'])
Error generated:
<urlopen error [Errno -2] Name or service not known>
Any help on this issue is greatly appreciated.
Thanks in advance,
Tanjil
04-27-2022 01:56 AM
Hello,
I have gotten the code to work by using office365 library instead.
03-10-2022 07:48 AM
Please use sharepy https://pypi.org/project/sharepy/ sharepoint library which you are using wasn't updated since 2015.
Alternative way is to use Azure logic apps and from there save it to Azure Data Lake Storage in format of your choice.
03-12-2022 03:39 PM
Thank you Hubert for your answer.
However, when running the following line:
s = sharepy.connect(SPUrl,username,password)
I am getting the following error:
'NoneType' object has no attribute 'group'.
03-11-2022 03:04 AM
Hi ,
Can you check on the below reference documentation and let us know whether it is helpful.
04-11-2022 02:16 PM
Hi @tanjil ,
Did you check @Kiran Bharathi docs? do you still need help?
04-11-2022 11:05 PM
Hi Tanjil,
Kindly check and update us in case you have any further queries on this.
04-27-2022 01:56 AM
Hello,
I have gotten the code to work by using office365 library instead.
01-11-2023 03:35 AM
Hello tanjil,
I am new here and I need that code Please Help me. MyAccountAccess Rewards
yesterday
The error "<urlopen error [Errno -2] Name or service not known>" suggests that there's an issue with the server URL or network connectivity. Double-check the server URL to ensure it's correct and accessible. Also, verify that your network connection is stable and that there are no firewall or proxy settings blocking the connection to SharePoint. If the issue persists, consider reaching out to your IT department or SharePoint administrator for assistance. MyAccountAccess
Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections.
Click here to register and join today!
Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.