ablakey

Zonal Stats as Table ERROR 010024: Error during conversion.

Discussion created by ablakey on Jun 30, 2011
Latest reply on Jul 22, 2014 by Cam_O12345
I have a small script that takes in a feature set and returns a table  via. Zonal Statistics as Table.  A raster that is hardcoded is used. If I create this in model builder it works fine, but in python it returns "ERROR 010024: Error during conversion"

I spent a few hours troubleshooting and can't identify why it wouldn't work properly.  The error refers to a conversion error, but I can't seem to see what is wrong.  The Zonal Stats as Table help says it accepts a Feature Layer but not a Feature Set, however a Feature Set seems to work just fine in the Model Builder implementation.

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

inputFS = arcpy.GetParameterAsText(0)
tableResult = arcpy.GetParameterAsText(1)

downtown_solar3pt5_Year = "D:\\TorontoData\\ArcServer Published Data\\Map Data\\Toronto Solar Main.gdb\\downtown_solar3pt5_Year"

arcpy.gp.ZonalStatisticsAsTable_sa(inputFS, "OBJECTID", downtown_solar3pt5_Year, tableResult, "DATA", "ALL")


The inputFS (feature set) has a schema set in both the python and model implementations.

Any help or suggestions would be appreciated!

Outcomes