NDR model - Error 411

Hello everyone,

I am trying to run the NDR model but everytime I get KeyError 411. Does anyone know what this error is? Is there somwhere where I can have an explanation of the error codes?

Thanks,

nicoc

InVEST-Nutrient-Delivery-Ratio-Model-(NDR)-log-2020-07-28–10_56_38.txt (8.1 KB)

Hi @nicoc

Welcome to the forums and thanks for posting. These KeyError messages usually point to a problem where a raster input like LULC is trying to reclassify its values based on a biophysical table that doesn’t have a matching value. So in this case, could you check that the LULC input has a value of 411, and that the lucode column in the biophysical table also has a value of 411?

There users guide is a good resource for things and mentions:

Land use/land cover: …All values in this raster MUST have corresponding entries in the Biophysical table

InVEST Users Guide NDR

If you search KeyError on this forum there will also be lots of other similar posts that might help.

Doug

Hi Doug,

thank you for you reply. Yes, I double checked but two numbers were inverted. Next time I’ll triple.
But now I know KeyErrors means there is something wrong with table/raster matching !

Thank you,

nico

1 Like

Glad you got it working! In the near future we’ll be updating those error messages to be way more helpful to users.