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

Key error 10

Hi, it is me again. I am trying to run the NDR model again, with a different land use and related different biophysical file, and got the key error 10. What is that? See detailed error Messages below. What is that now? Cheers again. Ingrid
09/22/2018 20:11:17 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x12AA3FB0>

Traceback (most recent call last):

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ui\model.py", line 1541, in _logged_target

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ndr\ndr.py", line 184, in execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 2510, in get_lookup_from_csv

KeyError: 10

09/22/2018 20:11:17 natcap.invest.ui.model INFO Execution finished

09/22/2018 20:11:17 natcap.invest.utils INFO Elapsed time: 0.06s

09/22/2018 20:11:17 natcap.invest.ui.execution ERROR Target <function _logged_target at 0x12AAFB70> failed with exception

Traceback (most recent call last):

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ui\execution.py", line 68, in run

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ui\model.py", line 1541, in _logged_target

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\ndr\ndr.py", line 184, in execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 2510, in get_lookup_from_csv

KeyError: 10

09/22/2018 20:11:17 natcap.invest.ui.execution INFO Execution finished



Comments

  • RichRich Administrator, NatCap Staff
    Hi Ingrid, I can't tell what's going on. Could you attach your biophysical table here so we can look?
  • Hi Rich, thank you. But now I have converted the new land use file into the format of the old land use file, and could therefore use the old biophysical table, which worked. But would be nice, if you could send the link to the meaning of all key Errors, as inbetween I also received Key Error 0, and did not know, what I had done wrong. Best. Ingrid
  • swolnyswolny Member, NatCap Staff
    edited September 2018
    Hi Ingrid -

    The number that is with the Key Error has to do with a Value in your land cover map, lucode in the biophysical table, or ws_id in the watershed shapefile, depending on where the error comes from. So the value of 0 in Key Error means that there's something wrong with a Value, lucode or ws_id with a value of 0 (or 10, or whatever number you get.) 

    Rumor has it that the software team is working on making these errors much more user-friendly, so we know better what's going wrong. Sorry it's still confusing.

    ~ Stacie
    Post edited by swolny on
  • many thanks, that already helped. Repaired it and completed model succesfully. Cheers. Ingrid

This discussion has been closed.