Cannot list items in a library
Hello,
i did find such code here in one of the issues:
from office365.sharepoint.client_context import ClientContext from office365.sharepoint.listitems.listitem import ListItem from office365.runtime.auth.client_credential import ClientCredential
list_title = "
site_url = "https://
creds = ClientCredential(client_id, client_secret) ctx = ClientContext(site_url).with_credentials(creds)
def print_progress(items): """ :type items: office365.sharepoint.listitems.collection.ListItemCollection """ print("Items read: {0}".format(len(items)))
large_list = ctx.web.lists.get_by_title(list_title) all_items = large_list.items.get_all(page_size, print_progress).execute_query()
I did apply the code in Azure Databricks, and even thou I know the files are existing there, the result is: Items read = 0
the script works fine, if i change a list_title to something non-existing, I will get error 404, so the location is fine.
I want to point out, that when im in my SP library location "Shared Documents" ("Dokumenty" in polish), its address is:
https://
and when I open a file called '123.xlsx' at that locatoin, its address is:
https://