I have an ArcGIS hosted feature layer, and want to make a selection based on a lat/lon. The last line is generating an error:
RuntimeError: Object: Error in executing tool)
I can't identify what I'm doing wrong. All is in WGS84. Here's the code
import arcpy
from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "xyz", "xyz")
append_layer_itemid = '33518827e9e24defbacd671bfd26XXXX'
#Grab the layer
fs_item = gis.content.get(append_layer_itemid)
fs_layer = fs_item.layers[0]
#make a layer with the points
arcpy.env.workspace = r"C:\Users\cbent\OneDrive\Documents\ArcGIS\Projects\MyProject\MyProject.gdb"
arcpy.MakeFeatureLayer_management('points_layer', 'point_layer')
arcpy.SelectLayerByLocation_management(fs_layer,'INTERSECT','point_layer')
It's the last line that's failing, any ideas?
Chuck