Hi team,
I am experiencing an issue where the MakeFeatureLayer_management() function. When I run it on my local machine, it returns the feature layer, but when I run the same script on the server it fails. See below:
token = "_____"
url = fr"https://foo.bar.com/server/rest/services/TargetServiceName/FeatureServer/0?token={token}"
layer_name = "Target Service Name"
layer = MakeFeatureLayer_management(url, layer_name).getOutput(0)
ERROR: Failed to execute. Parameters are not valid.
ERROR 000732: Input Features: Dataset https://foo.bar.com/server/rest/services/TargetServiceName/FeatureServer/0?token=_____ does not exist or is not supported
Failed to execute (MakeFeatureLayer).
I am just trying convert the REST URLs into objects that can be used in arcpy geoprocessing tools and cursors. Does anyone know why this error is occurring or whether there is another way to connect to these endpoints?
Please note that this script is completely ad-hoc - it isn't part of a geoprocessing service or anything like that.
I am running into this same issue. Did you ever solve this?
Well, I just found this:
https://support.esri.com/en-us/bug/the-arcpymakefeaturelayermanagement-function-fails-with-bug-00014...
How are we suppose to run gp tools on feature services? Summarize Within is not accepting just the feature service URL either as I am getting the same error there.