Select to view content in your preferred language

Arcpy Zonal statistics as a Table error

409
0
01-28-2020 05:38 AM
Katerina_Karagiannopoulou
New Contributor

Hi,

I am trying to apply the function "Zonal Statistics as Table" with the arcpy, using every time a default raster and different vector files and I receive the following error. 

Traceback (most recent call last):
File "C:\eclipse\eclipse-workspace\statistics\fuelData.py", line 59, in <module>
outZasT_fuelType = arcpy.gp.ZonalStatisticsAsTable_sa(fc, zone_field, fuelType_Raster, zonal_output_Path, "NODATA", "ALL")
File "C:\Program Files (x86)\ArcGIS\Desktop10.7\ArcPy\arcpy\geoprocessing\_base.py", line 510, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000865: Input value raster: gr30m_density_raster_upd.tif does not exist.
Failed to execute (ZonalStatisticsAsTable).

I would like to mention that the raster and the vector files are on different paths, so I try to set different working environments in the for loop and maybe this is the error. 

But, I would like to know how I could proceed ? 

I attach also the python script. 

Thank you in advance, 

Kind regards, 

Katerina 

0 Kudos
0 Replies