laptop and a wrench


An error occurs when attempting to save the output from a Spatial Analyst Math tool if it is executed after the Zonal Statistics tool in a Python script.

Last Published: November 13, 2014 ArcGIS for Desktop
Bug ID Number BUG-000082964
SubmittedNovember 3, 2014
Last ModifiedMarch 30, 2022
Applies toArcGIS for Desktop
Version found10.2.2
Operating SystemWindows OS
Operating System Version7

Additional Information

The script has some errors. The line for setting overwrite output data should be: env.overwriteOutput = True


Use the syntax exported by Mode lBuilder. The syntax includes an additional parameter for the output raster (out_raster). For example:<a href="" target="_blank"></a>.ZonalStatistics_sa(in_zone_data, zone_field, in_value_raster, out_raster, {statistics_type}, {ignore_nodata})<a href="" target="_blank"></a>.Minus_sa(in_raster_or_constant1, in_raster_or_constant2, out_raster)

Steps to Reproduce

Bug ID: BUG-000082964


  • ArcGIS for Desktop

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic