I am attempting to query for a service definition and getting list index out of range errors... not sure why.
Is it because it cant read it... the Service Definition is shared publicly so should not be permissions...
Any thoughts
sd_fs_name = "NeighborhoodUtilityPermits"
portal = "https://www.arcgis.com"
user = "username" # username that has permissions to the Feature Layer
sdItem = gis.content.search(query="title:"+ sd_fs_name + " AND owner: " + user, item_type="Service Definition")[0]
Search for original SD on portal…
Traceback (most recent call last):
File "C:\Users\Desktop\Portal_to_AGOL_Processing\ProcessingtoAGOL\AGOL_Module.py", line 96, in <module>
sdItem = gis.content.search(query="title:"+ sd_fs_name + " AND owner: " + user, item_type="Service Definition")[0]
IndexError: list index out of range