I have a script and when I run the ZonalStatisticsAsTable I get this error:
- File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing_base.py", line 510, in return lambda *args: val(gp_fixargs(args, True)) ExecuteError: Failed to execute. Parameters are not valid. ERROR 000824: The tool is not licensed. Failed to execute (ZonalStatisticsAsTable).
My code is:
flist = []
for file in files:
if os.path.isfile(os.path.join(root,file)) and file.endswith('.shp'):
flist.append(os.path.join(root,file))```
arcpy.env.workspace =r"Z:\EMSV-057_AOIs_Reshape\5_Process\1_TaskA\ModelBuilder\Pruebas_MV\EU_AOI\CAPAS"
for z in flist:
shape=z
erase=arcpy.Erase_analysis(shape,"C:\\OSM_coastlines\\water_polygons.shp", "Tierra", cluster_tolerance="")
tZONA=arcpy.gp.ZonalStatisticsAsTable_sa(erase, "FID", raster, "Tabla", "NODATA", "ALL")