todd93

Error when saving raster ouput using iterator item in the raster name

Discussion created by todd93 on Jun 5, 2012
Latest reply on Jun 6, 2012 by todd93
I am running into this error: "ERROR 010093: Output raster format UNKNOWN is unsupported" while attempting to save an output raster from the extract by mask function. Code snippet is below:

Main = sys.path[0]
env.workspace = Main

MainFdr = Main + os.sep + "fdr_combo"

HucPolys = Main + os.sep + "polys"

env.workspace = HucPolys

HUCs = arcpy.ListFeatureClasses()

for HUC in HUCs:
    try:
        env.workspace = HucPolys
        FDRpath = Main + os.sep + "fdr"
        FACpath = Main + os.sep + "fac"

        # Execute ExtractByMask
        FdrOut = ExtractByMask(MainFdr, HUC)
        # Save the output
        env.workspace = FDRpath
        FdrOut.save("fdr_" + HUC)
        
    except:
        print "error_" + HUC
        continue


It works if I remove the iterator item ID (+ HUC) from the save name. However, I need to keep this in as a unique identifier so I do not overwrite my previous output.

Does anyone have thoughts on how to resolve this?

Outcomes