arcpy.env.cellSize returns 'MAXOF' instead of numerical value

Discussion created by DrColgate on Aug 23, 2011
Latest reply on Aug 28, 2011 by DrColgate
I'm having some trouble with using arcpy to obtain the cell size of datsets when run in IDLE Python.

The code I am using reads the full path from a list of ECW files in a CSV and attempts to get the cellsize info using 'arcpy.env.cellSize':

for row in csvReader:

arcpy.env.cellSize = row[1]
cellSizeVal = arcpy.env.cellSize

This provides the result I want some of the time (e.g. 0.5) which is correct. However a lot of the time I am getting the value 'MAXOF' returned. However when I view the dataset in ArcView it has the value I am looking for. This data is generally available via an associated ERS file though it is more difficult to read and the ERS is not always available.

I am curious why I sometimes get the desired value and sometimes get the value MAXOF. Especially when the value is 'always' available in ArcView under the layer properties.