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
05-06-2024 05:38 AM
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 a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group