GetRasterProperties_management failing on some machines.

Discussion created by cwrobison on Jan 26, 2012
Latest reply on Jan 31, 2012 by csny490
I have section of Python code that does not work on all workstations. The code snippit follows:

394: arcpy.CalculateStatistics_management(Above_Freezing_Large_Non_Tss, 1, 1 )             
395: #
396: # Find the minimum and average temperature for large non vegetated regions
397: log.write('  Pure non-vegetated large regions with # of cells > 375\n')
398: log.write('    and temperature above '+str(Mix_Min_Value_275)+'\n')
399: gpOutput = arcpyy.GetRasterProperties_management(Above_Freezing_Large_Non_Tss,"MINIMUM")
400: PNR_Tss_Min = gpOutput.getOutput(0)
401: log.write('    Minimum temperature ....... '+PNR_Tss_Min+' K\n')
402: gpOutput = arcpy.GetRasterProperties_management(Above_Freezing_Large_Non_Tss,"MEAN")
403: PNR_Tss_Ave = gpOutput.getOutput(0)
405: log.write('    Average temperature ....... '+PNR_Tss_Ave+' K\n')

On my machine it works fine; however, on my co-workers machine it does not. The traceback occurs:

Traceback (most recent call last):[INDENT]File "D:\SHARPENING_ESPA_2009_P39\", line 402, in <module>[/INDENT]
[INDENT=2]gpOutput = arcpy.GetRasterProperties_management(Above_Freezing_Large_Non_Tss,"MEAN")
[INDENT]    File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\", line 8537, in GetRasterProperties[/INDENT]
[INDENT=2]raise e
ExecuteError: ERROR 001100: Failed because no statistics is available.
Failed to execute (GetRasterProperties).

This does not make any sense to me. The GetRasterProperties worked on line 399 for the minimum of the raster dataset, yet on line 402 it appears that they are unavailable ... same raster dataset.  Additionally, I have not found the 001100 error code on the web site to verify.  Both workstations report the same when I query the arcpy.env.rastStatistics property.


Any hints? Or, is this the wrong forum