-3

I am getting a syntax error here, I can't seem to see why.

>>> import arcpy
... from arcpy import env
... from arcpy.sa import *
... env.workspace = "C:\\AGData.gdb"
... outReclass1 = Reclassify("Reclass2015notrees", "Value", 
RemapValue([[35,1], [110,NODATA], [120,2], [122,3], [130,NODATA], [131,4}, 
[133,7], [134,6], [136,9], [137,7], [138,9], [139,7], [140,7], [147,10], 
[148,5], [149,32], [153,11], [154,9], [155,31], [157,9], [158,12], [162,13], 
[167,9], [175,14], [176,15], [177,16], [178,17], [179,18], [181,20], 
[183,22], [188,24], [189,25], [190,26], [191,30], [192,27], [193,NODATA], 
[194,28], [195,9], [199,29]]))
... outReclass1.save("ReclassData")
1
  • What is the full wording of your error message?
    – PolyGeo
    Commented Mar 13, 2018 at 20:40

2 Answers 2

2

According to the examples on the ESRI reclassify help page, NODATA should be "NODATA". From the page:

outReclass2 = Reclassify("slope_grd", "Value", RemapRange([[0,10,"NODATA"],[10,20,1],[20,30,2], [30,40,3],[40,50,4],[50,60,5],[60,75,6]]))

1
  • It didn't make a difference, I even tried the no data to 999 same error
    – user10720
    Commented Mar 13, 2018 at 20:17
0

It was one of the ] that was incorrect.

Not the answer you're looking for? Browse other questions tagged or ask your own question.