I am reclassifying texture classes of a soil raster into integers:
import arcpy
from arcpy import env
arcpy.CheckOutExtension('Spatial')
soil_path = 'C:\\Users\\....\\soil.gdb\\soil_raster"
class_map = [('Loamy very fine sand', 1), ('Sandy loam', 2), ('Loamy fine sand', 1), ('Silt', 4), ('Sandy clay', 11), ('Fine sand', 3), ('Very fine sandy loam', 2), ('Coarse sand', 3), ('Loamy sand', 1), ('Clay', 7), ('Very fine sand', 3), ('Silty clay', 9), ('Coarse sandy loam', 2), ('Loamy coarse sand', 1), ('Sand', 3), ('Sandy clay loam', 5), ('Clay loam', 6), ('Silty clay loam', 10), ('Silt loam', 4), ('Loam', 8), ('Fine sandy loam', 2)]
remap_values = arcpy.sa.RemapValue(class_values)
soil_reclass = arcpy.sa.Reclassify(in_raster='soil_path', reclass_field='texcl', remap=remap_values)
This returns an error
ExecuteError: ERROR 000622: Failed to execute (Reclassify). Parameters are not valid.
ERROR 000628: Cannot set input into parameter remap.
I am able to run the Reclassify tool just fine in ArcMap with these values, but copying the code as Python snippet doesn't help because once I format it for a standalone script, the error returns. (One weird thing: when pasting the snippet, some of the strings were unquoted, like clay instead of 'clay'.)
There was a similar question on here for which the answer was to check for repeat keys in the remap, but there aren't any here. Any ideas? Banging my head against my desk on this one.