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

Have a problem with running NDR model

Hi guys
I'm in trouble with the NDR model. I've projected every data into the same coordinating system but after running the model it still says "[errno 1] One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1"

Here's the log

Initializing...

Showing messages with level INFO and higher

10/01/2018 22:06:27 natcap.invest.utils INFO Writing log messages to C:\Users\jinan\Documents\ndr_workspace\InVEST-Nutrient-Delivery-Ratio-Model-(NDR)-log-2018-10-01--22_06_27.txt

10/01/2018 22:06:27 natcap.invest.ui.model Level 100 Starting model with parameters:

Arguments for InVEST natcap.invest.ndr.ndr 3.5.0:

biophysical_table_path C:/Users/jinan/Desktop/에코즈/_NDR/NDR_biophysical_table.CSV

calc_n True

calc_p False

dem_path C:/Users/jinan/Desktop/에코즈/_NDR/DEM/DEM.tif

k_param 2

lulc_path C:/Users/jinan/Desktop/에코즈/_NDR/landuse/landuse.tif

results_suffix

runoff_proxy_path C:/Users/jinan/Desktop/에코즈/_NDR/nutrient_runoff_proxy/nrp.tif

subsurface_critical_length_n 400

subsurface_critical_length_p

subsurface_eff_n 1

subsurface_eff_p

threshold_flow_accumulation 10000

watersheds_path C:/Users/jinan/Desktop/에코즈/_NDR/watershed/watershed.shp

workspace_dir C:\Users\jinan\Documents\ndr_workspace


10/01/2018 22:06:27 natcap.invest.ndr.ndr INFO calculating flow accumulation

10/01/2018 22:06:28 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO labeling flats

10/01/2018 22:06:28 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining away from higher

10/01/2018 22:06:28 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining towards lower

10/01/2018 22:06:28 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO labeling flats

10/01/2018 22:06:28 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining away from higher

10/01/2018 22:06:28 natcap.invest.pygeoprocessing_0_3_3.routing.routing_core INFO draining towards lower

10/01/2018 22:06:28 natcap.invest.pygeoprocessing_0_3_3.routing INFO flats exist on second pass, must be flat areas that abut the raster edge

10/01/2018 22:06:29 natcap.invest.ndr.ndr INFO Calculating slope

10/01/2018 22:06:29 natcap.invest.ndr.ndr INFO Thresholding slope

10/01/2018 22:06:29 natcap.invest.ndr.ndr INFO Aligning rasters

10/01/2018 22:06:30 natcap.invest.ndr.ndr INFO Aggregating runoff proxy to watersheds

10/01/2018 22:06:31 osgeo WARNING [errno 1] One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1. This warning will not be emitted anymore.

10/01/2018 22:06:31 natcap.invest.ndr.ndr INFO Nromalizing runoff proxy

10/01/2018 22:06:31 natcap.invest.ndr.ndr INFO Classifying streams from flow accumulation raster

10/01/2018 22:06:31 natcap.invest.ndr.ndr INFO Mapping n load to LULC

10/01/2018 22:06:31 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x11432FB0>

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 389, 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 2385, in vectorize_datasets

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

KeyError: 6

10/01/2018 22:06:31 natcap.invest.ui.model INFO Execution finished

10/01/2018 22:06:31 natcap.invest.utils INFO Elapsed time: 4.12s

10/01/2018 22:06:31 natcap.invest.ui.execution ERROR Target <function _logged_target at 0x1143E4F0> 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 389, 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 2385, in vectorize_datasets

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

KeyError: 6

10/01/2018 22:06:31 natcap.invest.ui.execution INFO Execution finished


Thanks a lot!


Comments

  • swolnyswolny Member, NatCap Staff
    Hi @Catservant -

    The error that I see in the log is a "KeyError: 6", and I think that we talked about KeyErrors in another post. How did you solve your previous KeyError? 

    ~ Stacie

  • Hi,
    I projected the coordinating system using UTF 52N in both SDR and NDR. However it isn’t working with the NDR model.
    Also, in the middle of the log it says osgeo WARNING [errno1] One or several characters couldn’t be converted correctly from UTF-8 to ISO-8859-1.
    Thank you
  • swolnyswolny Member, NatCap Staff
    I don't think the KeyError is a problem is with the coordinate system. And I think you should be able to ignore that WARNING about the characters. If you're concerned about that warning, look at your watershed, land cover and biophysical tables and see if there are any (Korean?) characters, try removing them and see if that makes the warning go away.

    ~ Stacie
  • Hello again

    There was some weird characters in watershed data' biophysical table, so I deleted that field and ran invest again but Key Error:6 popped out again. (rest of the files didn't have Korean characters)
    And when I tried to open 'load_n' file in Arcgis, just blank comes out. I think they don't have any values.
    I tried to attach that file here but I keep failing.
    Do you think this might be a clue?


  • RichRich Administrator, NatCap Staff
    Hi @catservant, it is very likely the "KeyError: 6" is happening because there is a landcover pixel with a value of 6 when there is no corresponding entry in your biophysical table. Can you check and see if this is the case?
  • Hi guys,
    I looked into the biophysical table and found out that value 6 part was missing! 
    I'm so sorry that I made such simple(?) mistake and thank you for everything.


Sign In or Register to comment.