This forum is shutting down! Please post new discussions at community.naturalcapitalproject.org

ValueError: The following land cover codes were found in the sensitivity table.

Hello out there,

I tried to rerun the Habitat Quality Model after minor changes in the threats table (weight values) and I updated to the newest Version. But now I always get the following error:


ValueError:The following land cover codes were found in the sensitivity table. Check your sensitivity table to see if they are missing: 127.


I changed nothing in comparison to the previous run, where I got decent results. Neither the LULC raster nor the sensitivity table have the land cover code 127. I attached the log. Thank you for your help!


Lisa


Comments

  • Important Note: I reinstalled the previous Version of InVEST and it works without any problems. Is it a bug of the new update or did the input requirements change?
  • jdouglassjdouglass Administrator, NatCap Staff
    Actually, this does look like a bug where some recently-added error checking doesn't account for the presence of a nodata value.  We're currently in the middle of an infrastructure rebuild, but I hope to be able to have a dev build in the not-to-distant future.

  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Lisa, sorry for the delay on this.  Could you try the development build linked below and see if that does the trick?


    I believe it will fix this issue, but it'd be nice to check on your inputs :)
  • Hey :)
    Running the habitatquality modul takes really much time on my computer and I am not done yet with the model runs I need for my study. So I won't be able to rerun models I already completed (with the older version). But as soon as I am done, I can test whether it works with your link!
  • jdbainjdbain Member
    edited March 14
    Hi jdouglass, I have also been having the same problem with the habitat quality module. I used the development build that you gave previously and the issue was still not fixed. I have also checked my inputs multiple times and still get the error message. 

    ValueError: The following land cover codes were found in the sensitivity table. Check your sensitivity table to see if they are missing:157675.06, 24886.02, 7407135.78.  These values are already listed as LULC codes in my sensitivity table so I don't understand why I keep getting this error message.  

    I would be happy to upload my documents if that would help. Thanks! 




    Jessica 
    Post edited by jdbain on
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Jessica,

    In your case, the error sounds like your landcover raster (which is expected to be an integer raster) has some pixels with floating-point values.  Could you make sure that the pixels with the values you mentioned (157675.06, 24886.02 and 7407135.78) are converted to the correct landcover codes and try re-running the model?

    If those floating-point numbers *are* intended to be valid landcover codes as they are, I'd suggest reclassifying those pixels to a integer landcover code and updating your sensitivity table accordingly.

    Hope this helps,
    James
Sign In or Register to comment.