I keep getting "Fatal Error (GETMAP) Bad NBIT Argument" error for the following sample script:
fields = ['Value', 'Class_Name'] cursor = arcpy.da.SearchCursor(LuTable, fields) for row in cursor: sqlQuery = "Value = " + str(row) print (sqlQuery) rasExtract = ExtractByAttributes(inRaster, sqlQuery) outCon = Con(IsNull(rasExtract),0,1) outAgg = Aggregate(outCon, 10, "SUM", "EXPAND", "DATA") outAgg.save(outRas) del row, cursor arcpy.Delete_management(LuTable)
I cannot find much documentation on this error. I have checked all the input rasters, output paths and set workspace and scratch space manually not included in the script. After inspecting it step-by-step, the
extract by attribute tool creates a blank raster and then abruptly stops. The only reference I found is this but they are talking about features not rasters. Has anyone experienced this error message?