I'm trying to create a script that will access an AGOL hosted feature service (polygon), run a FeatureToPoint geoprocessing task against it, and overwrite a separate hosted feature service. Below is a code snippet
outFC = "C:/GIS/AmericanWater/JamesMitchell/Poly2Point.gdb/WVAW_LineB_Projects_Points"
shh = securityhandlerhelper.securityhandlerhelper(securityinfo=securityinfo)
if shh.valid == False:
sql = "MapReady = 'Yes'"
resFeats = fl.query(where=sql)
fl = PointUrl
I get the following message when it reaches the FeaureToPoint geoprocessing tool
Traceback (most recent call last):
File "G:\ArcMap Settings\Python\Poly2Point.py", line 53, in <module>
File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 2583, in FeatureToPoint
RuntimeError: Object: Error in executing tool
It seems like the tool doesn't like that my input features are coming from a AGOL hosted service. Does this matter? Is there a way around this?