rangermry

Extract.save error?  Cannot save file

Discussion created by rangermry on Jul 11, 2013
Latest reply on Jul 11, 2013 by rangermry
Please help, I get an error? Error is that it cannot save?  The odd thing is it runs if I do not set it up as a toolbox and put the input name of the raster seperate from the folder name?  Any ideas or is that how it has to work?



#Extract by Attributes for all hubs
#by rangermry, 7-11-2013 using Python 2.6.5

import arcpy, os
from arcpy.sa import *
#Check out Spatial Analyst Licesne
arcpy.CheckOutExtension("Spatial")


ras=arcpy.GetParameterAsText(0)
saveSpace=arcpy.GetParameterAsText(1)


i=0.0
while i <= myRaster.maximum:
    i+=1
    inSQLClause="Value="+str(i)
    num=str((str(i)).split(".")[0])
    attExtract=ExtractByAttributes(ras,inSQLClause)
    attExtract.save(os.path.join(saveSpace,"Value"+num))

Outcomes