kmerriman

error with extract by mask

Discussion created by kmerriman on Oct 29, 2013
Latest reply on Oct 29, 2013 by kmerriman
Hi I am trying to batch extract by mask several watersheds from a single DEM. I know my DEM exists, however, I keep receiving the following error:
Traceback (most recent call last):
File "Z:/Sediment/extractbymask_edits.py", line 61, in <module>
subbasinDEM = arcpy.gp.ExtractByMask(arc3_feet, subbasin)
File "C:\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>
return lambda *args: val(*gp_fixargs(args))
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000860: Input raster: is not the type of Composite Geodataset, or does not exist.
Failed to execute (ExtractByMask).

I'm not sure what I am doing wrong here. Is it because I am accessing the DEM from a network server?
thanks. My code below.

# Create the Geoprocessor object
import sys, os, string
# Import arcpy module
import arcpy
from arcpy import env

# Check out any necessary licenses
arcpy.CheckOutExtension("Spatial")

dirpath = "Z:\\Sediment\\"
env.workspace = dirpath + "\\DrainageAReas.gdb" #can set as argumment
outpath = dirpath + "New File Geodatabase.gdb"

#Raster paths:
arc3_feet = "\\\\Sediment\\all_1-3arc"

# start loop of subbasin feature classes
fcList = arcpy.ListFeatureClasses() # return all features in workspace
for subbasin in fcList:
outfile = outpath + subbasin + "DEM"

# Extract by mask
subbasinDEM = arcpy.gp.ExtractByMask(arc3_feet, subbasin, outfile)

Outcomes