Values in the LULC_c raster were found that are not represented under the 'lucode' column of the Sensitivity table

Hello,
I’m running the 3.13.0 model for Habitat Quality. I encountered the following error:

ValueError: Values in the LULC_c raster were found that are not represented under the ‘lucode’ column of the Sensitivity table. The missing values found in the LULC_c raster but not the table are: [-128].

I am using the Habitat quality module to study habitat quality changes in river basins from 1980 to 2020. From 1980 to 2015, the model worked fine, but in 2020, there were some problems, I looked at some posts similar to my problem, and made some changes based on their solutions, in the sensitivity table, I added a row of data for the null value, and also defined the nodata value of the raster data as 0. But it still failed.

Here are the error details.
InVEST-natcap.invest.habitat_quality-log-2023-09-24–21_13_36.txt (7.4 KB)

Here are my attached Sensitivity table being used:
sensitivity3.csv (724 Bytes)

I am using the translation software to express my question, there may be some mistakes, please forgive me.
Thank you very much in advance!
Regards,
Alyssa

Please see the attached logfile and csv file for more details.

Hi Alyssa -

Thanks for posting your log file. Can you also provide the LULC raster so we can compare it with the sensitivity table?

~ Stacie

Thank you for your reply. Here is the LULC raster.
2020landuse2.tif (1.1 MB)

Thanks Alyssa -

I just looked at your LULC map, and it does have many pixels with a value of -128, surrounding what appears to be the watershed/area of interest. These look like background values that are probably not intended to be valid LULC pixels. So you will need to set NoData to -128, using something like a Reclassify tool in GIS.

~ Stacie

1 Like

Thank you very much, Stacie. Sorry for not replying to your message for so long, because we are on holiday for National Day these days.
As you suggested, I set NoData to -128, but a new problem arose.

ValueError: Values in the LULC_c raster were found that are not represented under the ‘lucode’ column of the Sensitivity table. The missing values found in the LULC_c raster but not the table are: [15].

Here are the error details.
InVEST-natcap.invest.habitat_quality-log-2023-10-08–20_37_42.txt (7.2 KB)

Regards
Alyssa

Hi Alyssa -

If you’re using the same sensitivity table that you sent me, it does not have an entry for LULC value 15.

~ Stacie

2 Likes

Yes,I get it! LULC in previous years did not have value 15, but this year value 15 was added, I added a line of 15 in the sensitivity table, and now the model is finally running successfully! Thank you very much for your patient guidance!

Best regards,

Alyssa

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.