For what its worth (a little late to the game from the original post). I'm replying since I also recently received similar error messages when running "Extract By Mask" in a Python script (ArcDesktop 10.3.1). In my particular instance I am referencing a single DEM and selecting multiple polygons to create unique rasters from each polygon. After realizing that a temporary file is created each time the "Extract By Mask" command is run, executing the save command allowed the passing of a variable with a unique name, eliminating the error messages, allowing the script to create the intended output(s). I also specified a scratch workspace.
script Example:
env.workspace = "//w63-atlas/Stormwater/Waterways/Structure Flood Severity"
bslash = "\\"Raster = bslash+"\\w63-atlas\Stormwater\AMEC\CLAY\TOPO\DEM\claydem.gdb\claydem"
arcpy.env.scratchWorkspace = "//w63-atlas/Stormwater/Waterways/Rasterdatasets.gdb"
tile = raw_input("Enter FEMA TILE : C4, C5, C6, D4, D5, D6, E5, E6, F5, F6, G5, or G6: ")
prefix = "Export_"suffix = "_Culv*_1.shp"depiwant = prefix+tile+suffix
fcList = arcpy.ListFeatureClasses(depiwant)
arcpy.AddMessage(Raster)for i in fcList: Culvnum = i[14:-4] rasnew = gdb+"/"+tile+"rz"+Culvnum[:-2] outExtractByMask = ExtractByMask(Raster,i) arcpy.AddMessage(outExtractByMask) outExtractByMask.save(rasnew) exit
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.