<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Zonal Statistics Crashes Randomly in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142261#M11065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;after turning Microsoft Security Essentials "Real Time Protection" off&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am starting to see a reoccuring problem here!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/66584-repeated-AddField-operations-fails-in-10.1-works-in-10.0"&gt;http://forums.arcgis.com/threads/66584-repeated-AddField-operations-fails-in-10.1-works-in-10.0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this issue is on ESRI's radar... And BTW it's not just Microsoft virus scan software... I've experienced this 1st on McAfee and now (after switching to Symantec since that initially fixed the problem), Symantec as well...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Symptom: ArcGIS tools randomly failing when run in a loop or in rapid repeated calls&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Oct 2012 16:43:39 GMT</pubDate>
    <dc:creator>ChrisSnyder</dc:creator>
    <dc:date>2012-10-13T16:43:39Z</dc:date>
    <item>
      <title>Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142248#M11052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Aloha,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having issues with the Spatial Analyst tool ZonalStatisticsAsTable in that it appears to crash the script for no reason. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The input zones (66 individual zones) is a raster file of the same extent, projection and cell size as the value raster. Some runs the script will iterate anywhere from 1 to 32 times (it needs to go the full 72 iterations) before crashing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also notice that the output table of the last zonal stats isn't complete when it crashes, it gets about 15 records (of 66) into the statistics table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any feedback and suggestions!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Colin&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;############################################################&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import string, datetime, arcpy

# set scratchworkspace... for desktop use, not ags use...
arcpy.env.scratchWorkspace = "C:/temp/scratch/"
# set overwrite outputs to true
arcpy.env.overwriteOutput = 1

# Variables...
netdcf_source_folder = "C:/mapservice_data/wrf/net_cdf_files/"
workspace_folder = "%SCRATCHWORKSPACE%/"
workspace_folder_filegdb = workspace_folder + "scratch.gdb/" 
sde_workspace_d2p2 = "C:/mapservice_files/db_connections/connection.sde/"
InMemory_netcdf_raster = "InMemory_netCDF_File"
table_template = "C:/mapservice_data/WRF/wrf.gdb/wrf_table_template_rain"
in_zone_data = "C:/mapservice_data/WRF/wrf.gdb/wrf_zones"
model_runtime = '"' + str(datetime.datetime.now()) + '"'

# Variables based on the user input variable...
input_netcdf_file = netdcf_source_folder + "RAIN_vn10km.nc"
target_table = workspace_folder_filegdb + "wrf_rain_v2"
out_netcdf_table_view = "wrf_rain_table_view"
sde_table = sde_workspace_d2p2 + "D2P2.wrf_rain_v2"
time_table = []

# Check out the spatial analyst extension...
arcpy.CheckOutExtension("Spatial")

try:
 # Create a 'catch all' table for the statistics, this will be copied to SDE
 # Copy Rows...CopyRows_management (in_rows, out_table, {config_keyword})
 arcpy.CopyRows_management(table_template, target_table)
except:
 print "copy rows fail", arcpy.GetMessages()

try:
 # Create table of time slices from netcdf file...
 # MakeNetCDFTableView_md (in_netcdf_file, variable, out_table_view, {row_dimension}, {dimension_values}, {value_selection_method})
 arcpy.MakeNetCDFTableView_md(input_netcdf_file, "rain", out_netcdf_table_view, "time", "", "")
except:
 print "time slice table fail", arcpy.GetMessages()
try:
 # SearchCursor to get time values...
 # SearchCursor (dataset, {where_clause}, {spatial_reference}, {fields}, {sort_fields})
 rows = arcpy.SearchCursor(out_netcdf_table_view, "", "", "time", "")
 currentTime = ""
 for row in rows:
&amp;nbsp; if currentTime != row.time:
&amp;nbsp;&amp;nbsp; currentTime = row.time
&amp;nbsp; time_table.append(row.time)
except:
 print "time_table fail", arcpy.GetMessages()

try:&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 # Create a list of index numbers in the netcdf file to process...
 x = 0
 for time in time_table:
&amp;nbsp; if x &amp;lt; 10:
&amp;nbsp;&amp;nbsp; y = "0" + str(x)#prefixes a "0" to numbers less than 10 to help in sorting.
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp; y = str(x)
&amp;nbsp; output_netcdf_raster = workspace_folder + "rain_" + y + ".img"
&amp;nbsp; zonalst_table = workspace_folder_filegdb + "rain_" + y + "_zonalst"
&amp;nbsp; time_slice_number = time
&amp;nbsp; 
&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; # Make NetCDF Raster Layer...MakeNetCDFRasterLayer_md (in_netcdf_file, variable, x_dimension, y_dimension, out_raster_layer, {band_dimension}, {dimension_values}, {value_selection_method})
&amp;nbsp;&amp;nbsp; arcpy.MakeNetCDFRasterLayer_md(input_netcdf_file, "rain", "longitude", "latitude", InMemory_netcdf_raster, "", time_slice_number, "BY_VALUE")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "Make NetCDF Raster Layer", time_slice_number, arcpy.GetMessages()

&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; # Copy Raster for zonal stats input...CopyRaster_management (in_raster, out_rasterdataset, {config_keyword}, {background_value}, {nodata_value}, {onebit_to_eightbit}, {colormap_to_RGB}, {pixel_type})
&amp;nbsp;&amp;nbsp; arcpy.CopyRaster_management(InMemory_netcdf_raster, output_netcdf_raster,"","","","","","")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "Copy Raster", time_slice_number, arcpy.GetMessages()

&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; # Zonal Stats as table...ZonalStatisticsAsTable (in_zone_data, zone_field, in_value_raster, out_table, {ignore_nodata}, {statistics_type})
&amp;nbsp;&amp;nbsp; arcpy.sa.ZonalStatisticsAsTable(in_zone_data, "D_NAME", output_netcdf_raster, zonalst_table, "DATA", "SUM")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "zonal stats as table", time_slice_number, arcpy.GetMessages()

&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; # Process: Add Field...AddField_management (in_table, field_name, field_type, {field_precision}, {field_scale}, {field_length}, {field_alias}, {field_is_nullable}, {field_is_required}, {field_domain})
&amp;nbsp;&amp;nbsp; arcpy.AddField_management(zonalst_table, "INDEXSLICE", "SHORT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "add field indexslice", index_slice_number, arcpy.GetMessages()
&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; # Process: Calculate Field...CalculateField_management (in_table, field, expression, {expression_type}, {code_block})
&amp;nbsp;&amp;nbsp; expression = y
&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(zonalst_table, "INDEXSLICE", expression, "PYTHON")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "calc field indexslice", index_slice_number, arcpy.GetMessages()

&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; arcpy.AddField_management(zonalst_table, "RUNTIME", "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "add field runtime", time_slice_number, arcpy.GetMessages()
&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(zonalst_table, "RUNTIME", model_runtime, "PYTHON")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "calc field runtime", time_slice_number, arcpy.GetMessages()

##&amp;nbsp; try:
##&amp;nbsp;&amp;nbsp; arcpy.AddField_management(zonalst_table, "TIMESLICE", "DATE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
##&amp;nbsp; except:
##&amp;nbsp;&amp;nbsp; print "add field timeslice", time_slice_number, arcpy.GetMessages()
##&amp;nbsp; try:
##&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(zonalst_table, "TIMESLICE", time_slice_number, "PYTHON")
##&amp;nbsp; except:
##&amp;nbsp;&amp;nbsp; print "calc field timeslice", time_slice_number, arcpy.GetMessages()
##
##&amp;nbsp; try:
##&amp;nbsp;&amp;nbsp; arcpy.AddField_management(zonalst_table, "TIMESLICETXT", "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
##&amp;nbsp; except:
##&amp;nbsp;&amp;nbsp; print "add field timeslicetxt", time_slice_number, arcpy.GetMessages()
##&amp;nbsp; try:
##&amp;nbsp;&amp;nbsp; arcpy.CalculateField_management(zonalst_table, "TIMESLICETXT", time_slice_number, "PYTHON")
##&amp;nbsp; except:
##&amp;nbsp;&amp;nbsp; print "calc field timeslicetxt", time_slice_number, arcpy.GetMessages()&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp; try:
&amp;nbsp;&amp;nbsp; # Process: Append...Append_management (inputs, target, {schema_type}, {field_mapping}, {subtype})
&amp;nbsp;&amp;nbsp; arcpy.Append_management(zonalst_table, target_table, "NO_TEST", "", "")
&amp;nbsp; except:
&amp;nbsp;&amp;nbsp; print "append", time_slice_number, arcpy.GetMessages()

&amp;nbsp; print y
&amp;nbsp; # add 1 to the counter
&amp;nbsp; x += 1

## #should add schema lock test here...
## TestSchemaLock (dataset)
## arcpy.TestSchemaLock()
 
## try:
##&amp;nbsp; # Copy the statistics table to SDE, overwriting the old table...
##&amp;nbsp; # Copy Rows...CopyRows_management (in_rows, out_table, {config_keyword})
##&amp;nbsp; arcpy.CopyRows_management(target_table, sde_table)
## except:
##&amp;nbsp; print "copyrows", time_slice_number, arcpy.GetMessages()

except:
 print "general failure", arcpy.GetMessages()

# Check in the spatial analyst extension...
arcpy.CheckInExtension("Spatial")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 21:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142248#M11052</guid>
      <dc:creator>ColinLindeman</dc:creator>
      <dc:date>2011-03-08T21:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142249#M11053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Make sure the zone raster and/or the value raster has a raster attribute table. If not, use the&amp;nbsp; BuildRasterAttrbibuteTable (or is it called CreateRasterAttributeTable? I forget).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Generally, if the raster has more than 500 (I think) values, the raster attribute table is not automatically created.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 03:37:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142249#M11053</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-03-09T03:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142250#M11054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wanted to let others know that i have found a workaround to my problem, although I would rather it work how it was intended to. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a bug report for this and its nimbus id is NIM063814, and here is a link&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYzODE0"&gt;http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYzODE0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had used a os.spawnv to perform the "Zonal Statistics as Table" for each individual raster, which kept the memory isolated and ran without any crashing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will share the scripts here soon or send me an email if they aren't up yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Colin&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;here are some links that got me on the track to use os.spawnv&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=173610&amp;amp;mc=33"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=173610&amp;amp;mc=33&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 00:53:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142250#M11054</guid>
      <dc:creator>ColinLindeman</dc:creator>
      <dc:date>2011-03-23T00:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142251#M11055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In the olden days you used to be able to run the SA tools (like zonal stats) in a loop for weeks with no memory leaks. Whatever ESRI did to some of the SA tools in v9.3 and v10 seemed to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Increase the speed of execution (sometimes by a whole lot). We all appreciate that...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Cause many of these algorithms to run out of memory. Yar...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One example is the Fill tool. In years past, the thing might take a week to finish, but it finished. Now the stupid things just bombs with an 'out of memory' error. Hmm...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 20:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142251#M11055</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-03-23T20:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142252#M11056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I wanted to let others know that i have found a workaround to my problem, although I would rather it work how it was intended to. &lt;BR /&gt;&lt;BR /&gt;There is a bug report for this and its nimbus id is NIM063814, and here is a link&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYzODE0"&gt;http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYzODE0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I had used a os.spawnv to perform the "Zonal Statistics as Table" for each individual raster, which kept the memory isolated and ran without any crashing.&lt;BR /&gt;&lt;BR /&gt;I will share the scripts here soon or send me an email if they aren't up yet.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;-Colin&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;edit:&lt;BR /&gt;here are some links that got me on the track to use os.spawnv&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=173610&amp;amp;mc=33"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=173610&amp;amp;mc=33&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey Colin, I think I'm coming across the same exact issue.&amp;nbsp; I'm running ZonalStatisticsAsTable on a bunch of rasters using ListRasters.&amp;nbsp; It gets through about 4 or 5 before it crashes.&amp;nbsp; Can you post some of your code that shows how you used the spawnv?&amp;nbsp; BTW I came across those forum posts about spawnv also but noticed they're from about 2005.&amp;nbsp; I can't believe we are still dealing with this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nils&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 23:28:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142252#M11056</guid>
      <dc:creator>NilsBabel</dc:creator>
      <dc:date>2011-06-22T23:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142253#M11057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having this same issue with ArcGIS 10 SP2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any solution yet?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is strange is the script works just fine for about 10-15 files while looping through 1200 RASTER GRIDs of climate data and it crashes with the following. If I rerun it again, it works again but crashes at another file (may be after 40 files). It is totaly random and I don't know why.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:Red;"&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "C:\DATA2011\scripts\zonalStat_CRU.py", line 36, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, infile, outTable, "NODATA", "MEAN")&lt;BR /&gt;&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 5837, in ZonalStatisticsAsTable&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statistics_type)&lt;BR /&gt;&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Utils.py", line 47, in swapper&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = wrapper(*args, **kwargs)&lt;BR /&gt;&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 5829, in wrapper&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statistics_type)&lt;BR /&gt;&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return lambda *args: val(*gp_fixargs(args))&lt;BR /&gt;ExecuteError: ERROR 999999: Error executing function.&lt;BR /&gt;Workspace or data source is read only.&lt;BR /&gt;Workspace or data source is read only. [The C:\DATA2011\DATA\CRU3\hru\tmn\ workspace is read only.]&lt;BR /&gt;ERROR 010067: Error in executing grid expression. Zonal statistics program failed&lt;BR /&gt;Failed to execute (ZonalStatisticsAsTable).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy.sa import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #def zonal_stat(indir):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Set scratch workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.scratchWorkspace = "c:\\mytempfile.gdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CheckOutExtension("Spatial") #chaeckout spatial analyst extension&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Set environment settings&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; basedir = "C:\\DATA2011\\DATA\CRU3\\resampled\\tmn\\"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; indirs = ['tmn\\', 'vap\\', 'cld\\']&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Set the feature class zone data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inZoneData = r'C:\DATA2011\Model_500\bnile_hruf.shp'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoneField = "GRIDCODE"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for indir in indirs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; env.workspace = basedir + indir&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outtemp = env.workspace&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outpath = outtemp.replace('resampled', 'hru')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rasterList = arcpy.ListRasters("*", "GRID")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not os.path.exists(outpath):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.makedirs(outpath)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for infile in rasterList:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Zonal Stat&amp;nbsp; ..." + outpath + infile&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outTable = outpath + "\\CRU_" + infile + ".dbf"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, infile, outTable, "NODATA", "MEAN")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages(2)[/PHP]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2011 12:58:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142253#M11057</guid>
      <dc:creator>DagnachewLegesse</dc:creator>
      <dc:date>2011-07-22T12:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142254#M11058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've found that first manually (or programmatically) converting my zone polygons to rasters improves chances of success. Definitely not a reliable solution though....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2011 15:48:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142254#M11058</guid>
      <dc:creator>ChrisBater</dc:creator>
      <dc:date>2011-07-22T15:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142255#M11059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When run in a loop, the Watershed SA tool will also randomly fail if the input "pour points" are in vector format. If you 1st convert the points to a GRID, the process become stable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2011 16:29:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142255#M11059</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-07-22T16:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142256#M11060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I wanted to let others know that i have found a workaround to my problem, although I would rather it work how it was intended to. &lt;BR /&gt;&lt;BR /&gt;There is a bug report for this and its nimbus id is NIM063814, and here is a link&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYzODE0"&gt;http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYzODE0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I had used a os.spawnv to perform the "Zonal Statistics as Table" for each individual raster, which kept the memory isolated and ran without any crashing.&lt;BR /&gt;&lt;BR /&gt;I will share the scripts here soon or send me an email if they aren't up yet.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;-Colin&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;edit:&lt;BR /&gt;here are some links that got me on the track to use os.spawnv&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=173610&amp;amp;mc=33"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=173610&amp;amp;mc=33&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wonder, would writing and then calling external modules accomplish the same thing as os.spawnv in terms of memory management?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See for example: &lt;/SPAN&gt;&lt;A href="http://docs.python.org/tutorial/modules.html"&gt;http://docs.python.org/tutorial/modules.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2011 16:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142256#M11060</guid>
      <dc:creator>ChrisBater</dc:creator>
      <dc:date>2011-07-22T16:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142257#M11061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I wonder, would writing and then calling external modules accomplish the same thing as os.spawnv in terms of memory management?&lt;BR /&gt;&lt;BR /&gt;See for example: &lt;A href="http://docs.python.org/tutorial/modules.html"&gt;http://docs.python.org/tutorial/modules.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Chris for the suggestion about using RASTER for the zones. I will give it a try. As to the external module suggestion, as you can see in my code above, I have tried that too (commented line). Will also give that a more try with the raster zone and report back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;have a good day&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dag&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jul 2011 05:23:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142257#M11061</guid>
      <dc:creator>DagnachewLegesse</dc:creator>
      <dc:date>2011-07-23T05:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142258#M11062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Has anyone from ESRI commented on this? I am have an identical problem while making a Select By Attribute followed by Zonal Statistics as Table, and my ArcMap crashes every time. This is disturbing because Zonal Statistics is a tool that many people use frequently. Is there a fix in the works?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 18:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142258#M11062</guid>
      <dc:creator>JamieKass</dc:creator>
      <dc:date>2012-08-30T18:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142259#M11063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm experiencing the exact same problem with ArcGIS 10 SP5.&amp;nbsp; I can reproduce with multiple zonal sources, different folder/file and geodatabase outputs, both with background processing on and off and for polygon/raster zonal areas of varying sizes (50-1600 areas) and occurs when running as a standalone script or from within ArcMap.&amp;nbsp; It's extremely frustrating because the read/write locking only affects one of the machines I work on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Executing: ZonalStatisticsAsTable admin_Union ADMINID KHM_popmap_admin003_v2b.tif C:\tmp\test2.dbf DATA SUM
Start Time: Sat Oct 13 10:44:14 2012
ERROR 999999: Error executing function.
Workspace or data source is read only.
Workspace or data source is read only. [The C:\tmp\ workspace is read only.]
ERROR 010067: Error in executing grid expression. Zonal statistics program failed
Failed to execute (ZonalStatisticsAsTable).
Failed at Sat Oct 13 10:44:28 2012 (Elapsed Time: 14.00 seconds)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It makes it through about half of the zonal areas and the fails apparently because it can't write to the table.&amp;nbsp; Any comments from ESRI would be useful?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:50:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142259#M11063</guid>
      <dc:creator>ForrestStevens1</dc:creator>
      <dc:date>2021-12-11T07:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142260#M11064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm experiencing the exact same problem with ArcGIS 10 SP5.&amp;nbsp; I can reproduce with multiple zonal sources, different folder/file and geodatabase outputs, both with background processing on and off and for polygon/raster zonal areas of varying sizes (50-1600 areas) and occurs when running as a standalone script or from within ArcMap.&amp;nbsp; It's extremely frustrating because the read/write locking only affects one of the machines I work on.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Executing: ZonalStatisticsAsTable admin_Union ADMINID KHM_popmap_admin003_v2b.tif C:\tmp\test2.dbf DATA SUM
Start Time: Sat Oct 13 10:44:14 2012
ERROR 999999: Error executing function.
Workspace or data source is read only.
Workspace or data source is read only. [The C:\tmp\ workspace is read only.]
ERROR 010067: Error in executing grid expression. Zonal statistics program failed
Failed to execute (ZonalStatisticsAsTable).
Failed at Sat Oct 13 10:44:28 2012 (Elapsed Time: 14.00 seconds)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;It makes it through about half of the zonal areas and the fails apparently because it can't write to the table.&amp;nbsp; Any comments from ESRI would be useful?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, I may have solved the problem in at least a subset of my use cases, as I haven't been able to duplicate this error after turning Microsoft Security Essentials "Real Time Protection" off.&amp;nbsp; I'm not running any other virus/spyware protection on the machine in question, but the "Real Time Protection" seems to consistently cause table writing functions of ArcGIS/Python Geoprocessing to fail with the read/write lock mentioned above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this might help others with the same problem!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:50:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142260#M11064</guid>
      <dc:creator>ForrestStevens1</dc:creator>
      <dc:date>2021-12-11T07:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142261#M11065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;after turning Microsoft Security Essentials "Real Time Protection" off&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am starting to see a reoccuring problem here!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/66584-repeated-AddField-operations-fails-in-10.1-works-in-10.0"&gt;http://forums.arcgis.com/threads/66584-repeated-AddField-operations-fails-in-10.1-works-in-10.0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this issue is on ESRI's radar... And BTW it's not just Microsoft virus scan software... I've experienced this 1st on McAfee and now (after switching to Symantec since that initially fixed the problem), Symantec as well...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Symptom: ArcGIS tools randomly failing when run in a loop or in rapid repeated calls&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 16:43:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142261#M11065</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-10-13T16:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142262#M11066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am starting to see a reoccuring problem here!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/66584-repeated-AddField-operations-fails-in-10.1-works-in-10.0"&gt;http://forums.arcgis.com/threads/66584-repeated-AddField-operations-fails-in-10.1-works-in-10.0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this issue is on ESRI's radar... And BTW it's not just Microsoft virus scan software... I've experienced this 1st on McAfee and now (after switching to Symantec since that initially fixed the problem), Symantec as well...&lt;BR /&gt;&lt;BR /&gt;Symptom: ArcGIS tools randomly failing when run in a loop or in rapid repeated calls&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed.&amp;nbsp; I don't have administrative access to disable the real-time protection on many of the machines I need to run these processes on.&amp;nbsp; But it seems like for repeated field or write operations that some type of buffering or delay should be default behavior for geoprocessing tools with the option of optimizing it for situations where no real-time monitoring is present.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 17:03:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142262#M11066</guid>
      <dc:creator>ForrestStevens1</dc:creator>
      <dc:date>2012-10-13T17:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Zonal Statistics Crashes Randomly</title>
      <link>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142263#M11067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Interestingly I was having the same problem for a while and after enabling garbage collection, my script now runs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import gc
gc.enable()
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:50:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zonal-statistics-crashes-randomly/m-p/142263#M11067</guid>
      <dc:creator>GerardoArmendariz</dc:creator>
      <dc:date>2021-12-11T07:50:20Z</dc:date>
    </item>
  </channel>
</rss>

