I am facing this error time and again when I am try to read my img rasters and running a conditional statement. I am new to Python. The code ran for one raster that is without for loop but not later. Here is the code:
import arcpy, os
from arcpy import env
from arcpy.sa import *
env.overwriteOutput = True
arcpy.env.workspace = r"C:\Users\libpub\Desktop\try"
arcpy.CheckOutExtension('Spatial')
rasterlist = arcpy.ListRasters()
for raster in rasterlist:
out1 = Con(('Raster')>0.2, 1, 0)
print out1
out1.save("C:\Users\libpub\Desktop\try")
print "done!"
out1.save(r"...