KeyError Ecountered: 47 - question

I cant seem to get pass this point after I run the data for NDR? Any suggestions.

Initializing...

11/13/2016 15:59:10 root DEBUG Loading <module 'natcap.invest.ndr.ndr' from 'C:\INVEST~1.2_X\INVEST~1\natcap\invest\ndr\ndr.pyc'> in frozen environment

Arguments:

biophysical_table_path C:/Users/Akilah/Desktop/InVEST/biophysical_table_retention2.csv

calc_n True

calc_p False

dem_path C:/Users/Akilah/Desktop/InVEST/50m_projected/dblbnd.adf

k_param 2

lulc_path C:/Users/Akilah/Desktop/InVEST/landuse_proj/dblbnd.adf

runoff_proxy_path C:/Users/Akilah/Desktop/InVEST/thieseen_p2p/dblbnd.adf

subsurface_critical_length_n 150

subsurface_eff_n 0.8

threshold_flow_accumulation 2

watersheds_path C:/Users/Akilah/Desktop/InVEST/bois_neuf.shp

workspace_dir C:\Users\Akilah/Documents/ndr_workspace



11/13/2016 15:59:10 root INFO Logging will be saved to natcap.invest.ndr.ndr-log-2016-11-13--15_59_10.txt

11/13/2016 15:59:10 root DEBUG Loaded the model from natcap.invest.ndr.ndr

11/13/2016 15:59:10 root INFO Executing the loaded model

11/13/2016 15:59:10 root INFO Running InVEST version "3.3.2"

11/13/2016 15:59:10 root INFO Python architecture: ('32bit', 'WindowsPE')

11/13/2016 15:59:10 root INFO Disk space remaining for workspace: 167.93 GB

11/13/2016 15:59:10 root INFO Pointing temporary directory at the workspace at C:\Users\Akilah/Documents/ndr_workspace

11/13/2016 15:59:10 root INFO Updating os.environ["TMP"]=C:\Users\Akilah/Documents/ndr_workspace\tmp to C:\Users\Akilah/Documents/ndr_workspace

11/13/2016 15:59:10 root INFO Updating os.environ["TEMP"]=C:\Users\Akilah/Documents/ndr_workspace\tmp to C:\Users\Akilah/Documents/ndr_workspace

11/13/2016 15:59:10 root INFO Updating os.environ["TMPDIR"]=C:\Users\Akilah/Documents/ndr_workspace\tmp to C:\Users\Akilah/Documents/ndr_workspace

11/13/2016 15:59:10 root INFO Setting tempfile.tempdir to C:\Users\Akilah/Documents/ndr_workspace\tmp

11/13/2016 15:59:10 root INFO Starting natcap.invest.ndr.ndr

11/13/2016 15:59:10 natcap.invest.ndr.ndr INFO calculating flow accumulation

11/13/2016 15:59:10 pygeoprocessing.routing.routing_core INFO labeling flats

11/13/2016 15:59:10 pygeoprocessing.routing.routing_core INFO draining away from higher

11/13/2016 15:59:10 pygeoprocessing.routing.routing_core INFO draining towards lower

11/13/2016 15:59:10 pygeoprocessing.routing DEBUG flats exist, calculating flow direction for them

11/13/2016 15:59:10 pygeoprocessing.routing.routing_core INFO labeling flats

11/13/2016 15:59:10 pygeoprocessing.routing.routing_core INFO draining away from higher

11/13/2016 15:59:10 pygeoprocessing.routing.routing_core INFO draining towards lower

11/13/2016 15:59:10 pygeoprocessing.routing INFO flats exist on second pass, must be flat areas that abut the raster edge

11/13/2016 15:59:10 pygeoprocessing.routing DEBUG starting flow accumulation

11/13/2016 15:59:11 natcap.invest.ndr.ndr INFO Calculating slope

11/13/2016 15:59:11 natcap.invest.ndr.ndr INFO Classifying streams from flow accumulation raster

11/13/2016 15:59:11 root ERROR ---------------------------------------------------

11/13/2016 15:59:11 root ERROR ---------------------- ERROR ----------------------

11/13/2016 15:59:11 root ERROR ---------------------------------------------------

11/13/2016 15:59:11 root ERROR Error: exception found while running natcap.invest.ndr.ndr

11/13/2016 15:59:11 root DEBUG

11/13/2016 15:59:11 root DEBUG Build details

11/13/2016 15:59:11 root DEBUG Interpreter

11/13/2016 15:59:11 root DEBUG Current temp dir: C:\Users\Akilah/Documents/ndr_workspace\tmp

11/13/2016 15:59:11 root DEBUG tempfile.tempdir: C:\Users\Akilah/Documents/ndr_workspace\tmp

11/13/2016 15:59:11 root DEBUG

11/13/2016 15:59:11 root DEBUG System

11/13/2016 15:59:11 root DEBUG OS : Windows-7-6.1.7601-SP1

11/13/2016 15:59:11 root DEBUG Processor architecture: AMD64

11/13/2016 15:59:11 root DEBUG FS encoding : mbcs

11/13/2016 15:59:11 root DEBUG Preferred encoding: cp1252

11/13/2016 15:59:11 root DEBUG

11/13/2016 15:59:11 root DEBUG Python

11/13/2016 15:59:11 root DEBUG Version : 2.7.9

11/13/2016 15:59:11 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')

11/13/2016 15:59:11 root DEBUG Compiler : MSC v.1500 32 bit (Intel)

11/13/2016 15:59:11 root DEBUG Implementation : CPython

11/13/2016 15:59:11 root DEBUG Architecture : 32bit

11/13/2016 15:59:11 root DEBUG Linkage format : WindowsPE

11/13/2016 15:59:11 root DEBUG

11/13/2016 15:59:11 root DEBUG Packages

11/13/2016 15:59:11 root DEBUG Cython : ?

11/13/2016 15:59:11 root DEBUG Numpy : 1.11.2rc1

11/13/2016 15:59:11 root DEBUG Scipy : 0.16.1

11/13/2016 15:59:11 root DEBUG OSGEO : 1.11.3

11/13/2016 15:59:11 root DEBUG Shapely : 1.5.5

11/13/2016 15:59:11 root DEBUG InVEST : 3.3.2

11/13/2016 15:59:11 root DEBUG

11/13/2016 15:59:11 root DEBUG

11/13/2016 15:59:11 root DEBUG Exception not environment-related

11/13/2016 15:59:11 root DEBUG Printing traceback

Traceback (most recent call last):

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.iui.executor", line 560, in runModel

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.ndr.ndr", line 385, in execute

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.geoprocessing", line 2407, in vectorize_datasets

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.ndr.ndr", line 297, in map_load

KeyError: 47



11/13/2016 15:59:11 root ERROR Exiting due to failures


Comments

  • RichRich Administrator, NatCap Staff
    Hi, eyeballing that line of code, it looks you might have a case where you have a landcover ID of 47, but no equivalent nitrogen loading value in your biophysical table.  Can you check and see if that's the case?
Sign In or Register to comment.