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

Pollination keyerror 161

jalpjalp Member
Does anyone have any clue about this error?

05/01/2018 11:09:46 pygeoprocessing.geoprocessing INFO ReprojectImage 80.0% complete c:\users\josea\appdata\local\temp\clipped_raster6hpsta, psz_message ''

05/01/2018 11:09:51 pygeoprocessing.geoprocessing INFO ReprojectImage 100.0% complete c:\users\josea\appdata\local\temp\clipped_raster6hpsta, psz_message ''

05/01/2018 11:14:06 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x12F09230>

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\ui\model.py", line 1505, in _logged_target

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pollination.py", line 688, in execute

KeyError: 161

05/01/2018 11:14:06 natcap.invest.ui.model INFO Execution finished

05/01/2018 11:14:06 natcap.invest.utils INFO Elapsed time: 11h 8m 3.83s

05/01/2018 11:14:06 natcap.invest.ui.execution ERROR Target <function _logged_target at 0x0499D0B0> failed with exception

Traceback (most recent call last):

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_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\release_env\lib\site-packages\natcap\invest\ui\model.py", line 1505, in _logged_target

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pollination.py", line 688, in execute

KeyError: 161

05/01/2018 11:14:06 natcap.invest.ui.execution INFO Execution finished

Comments

  • swolnyswolny Member, NatCap Staff
    Hi @jalp -

    A KeyError usually means that you have a value in your land use/land cover raster that does not have corresponding values in the biophysical (in this case, sensitivity) table. Do you have a land use code of 161 in your LULC raster that is not in the sensitivity table? If so, you'll need to add data to the sensitivity table for that land use code.

    ~ Stacie
  • jalpjalp Member
    It was a problem with my farms shape (my land use raster were not coincident with the farm polygons), thank you for your swift response!
  • SylvieSylvie Member
    Hi Stacy,

    I have a similar error, only mine is KeyError 159. I've tried to look to see if there is something missing between my LULC and my Biophysical (Nesting & Floral Resources) table- but I can't spot one. I also dont have a LULC class 159 (I do have 158 tho). Are there other potential sources of error that would cause this?

    Thanks! 
  • jalpjalp Member
    In my case the problem was the farm shapefile. The number 160 was related to the polygon id #160. My advice is to check if the shape of your farm polygons are consistent with the resolution of your raster.
Sign In or Register to comment.