I'm trying to use ExtractByAttributes() in a PYT.
I couldn't get it to work, so I tried the GP Pane. That worked fine. So, I copy-pasted the command from GP Pane into my PYT and it still failed.
Code:
with arcpy.EnvManager(scratchWorkspace=r"\\...\Default.gdb"):
out_raster = arcpy.sa.ExtractByAttributes(
in_raster=r"\\...\Default.gdb\SurfaceDEMClip_A",
where_clause="VALUE <= 2007.11"
)
Errors:
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.ERROR 000864: Input raster: The input is not within the defined domain.ERROR 000969: The input raster is not integer type.ERROR 000864: Field: The input is not within the defined domain.ERROR 000889: Invalid field type.
Failed to execute (RasterToPolygon).
Does anyone know what's going on or how to fix it? (Or an alternative?)