Dear all,
I would like to get the properties of a specific item inside a Sharepoint list.
I'm working with the latest version of Office365-REST-Python-Client.
I can do that with get_items()
function, but not with get_item_by_id()
or get_item_by_unique_id()
Could you help me ?
Thanks in advance.
Here my code and some comments :
ctx_test = ctx(list_url,user)
list_test = ctx_test.web.lists.get_by_title(list1)
items = list_test.get_items().execute_query()
print(items)
print(items[0].properties["ID"], items[0].properties["Title"]) ## This part correctly works
item = list_test.get_item_by_id(2).execute_query()
print(item.properties["ID"], item.properties["Title"]) ## Not this one
'''
the error message is :
print(item.properties["ID"], item.properties["Title"]) ~~~~~~~~~~~~~~~^^^^^^ KeyError: 'ID'
'''