marvinaboyd

AttributeError: 'Raster' object attribute 'save' is read-only

Discussion created by marvinaboyd on Jul 8, 2011
Latest reply on Feb 19, 2014 by dicky1980
Hello all,

I'm having a bit of trouble with some batch processing; specifically with the .save portion of the loop in the code below.  Everytime I try to save any raster calculation I receive the following error:

AttributeError: 'Raster' object attribute 'save' is read-only

I'm hoping there is a work-around or an error with my code; any suggestions would be greatly appreciated.


rasts = arcpy.ListRasters()

for rast in rasts:
       output = outdir + "/" + str(rast) + "_stage"
       outCon = Con(Raster(rast),1)

       outCon.save = output

Outcomes