I have section of Python code that does not work on all workstations. The code snippit follows:
393: gpOutput.save(Above_Freezing_Large_Non_Tss)
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\ThermalSharpen_IP_07072009.py", line 402, in <module>[/INDENT]
[INDENT=2]gpOutput = arcpy.GetRasterProperties_management(Above_Freezing_Large_Non_Tss,"MEAN")
[/INDENT]
[INDENT] File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 8537, in GetRasterProperties[/INDENT]
[INDENT=2]raise e
[/INDENT]
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.
arcpy.env.rasterStatistics
u'STATISTICS 1 1'
Any hints? Or, is this the wrong forum
Clarence