Using python I'm having problems when trying to attempt a FOR LOOP with the ZonalHistogram function of ArcGIS 10.1. It works fine if I use it only for one image but it gives me this error while for looping:
ExecuteError: ERROR 999999: Error executing function.
Create output table failed
Failed to execute (ZonalHistogram)
Here is my very simple script:
import arcpy
from arcpy.sa import *
arcpy.env.workspace = 'G:\\Chile_2012\\MODIS10A2.V005\\prova'
elev_ranges = 'G:\\Chile_2012\\MODIS10A2.V005\\DEM\\elev_ranges'
list = arcpy.ListRasters ()
out_dir = 'G:\\Chile_2012\\MODIS10A2.V005\\prova\\hypso\\'
arcpy.CheckOutExtension ('Spatial')
for raster in list:
ZonalHistogram (raster, 'Value', elev_ranges, out_dir+ raster+ '.dbf')