Error in running InVEST Blue Carbon Model

Hello! I am trying to run the InVEST Blue Carbon Model using some of the inputs as a test run. I have inputted a raster of seagrass map with its respective CSV files (standing stock as of this moment) but when I did a test run, there was an error and these are the details of the error: 

Arguments:
analysis_year              
carbon_pool_initial_uri    D:/Users/Kix/Documents/Anjuli's Stuff/Final Thesis/inputs to InVEST Blue Carbon Model/carbon_pool_initial_thesis.csv
carbon_pool_transient_uri  D:/Users/Kix/Documents/Anjuli's Stuff/Final Thesis/inputs to InVEST Blue Carbon Model/carbon_pool_transient_thesis.csv
discount_rate              6.0
do_economic_analysis       True
do_price_table             False
interest_rate              3.0
lulc_baseline_map_uri      D:/Users/Kix/Documents/Anjuli's Stuff/Final Thesis/bolinao.tif
lulc_baseline_year         2010
lulc_lookup_uri            D:/Users/Kix/Documents/Anjuli's Stuff/Final Thesis/inputs to InVEST Blue Carbon Model/lulc_lookup.csv
lulc_transition_maps_list  []
lulc_transition_matrix_uri D:/Users/Kix/Documents/Anjuli's Stuff/Final Thesis/inputs to InVEST Blue Carbon Model/carbon_pool_transient_thesis.csv
lulc_transition_years_list []
price                      10.0
results_suffix             
workspace_dir              D:\Users\Kix\Documents\Anjuli's Stuff\Final Thesis\Sample Run with sort of thesis inputs


01/24/2018 14:48:50  root               INFO     Logging will be saved to natcap.invest.coastal_blue_carbon.coastal_blue_carbon-log-2018-01-24--14_48_50.txt
01/24/2018 14:48:50  root               DEBUG    Loaded the model from natcap.invest.coastal_blue_carbon.coastal_blue_carbon
01/24/2018 14:48:50  root               INFO     Executing the loaded model
01/24/2018 14:48:50  root               INFO     Running InVEST version "3.3.3"
01/24/2018 14:48:50  root               INFO     Python architecture: ('32bit', 'WindowsPE')
01/24/2018 14:48:50  root               INFO     Disk space remaining for workspace: 131.62 GB
01/24/2018 14:48:51  root               INFO     Pointing temporary directory at the workspace at D:\Users\Kix\Documents\Anjuli's Stuff\Final Thesis\Sample Run with sort of thesis inputs
01/24/2018 14:48:53  root               INFO     Starting natcap.invest.coastal_blue_carbon.coastal_blue_carbon
01/24/2018 14:48:53  root               INFO     Setting tempfile.tempdir to D:\Users\Kix\Documents\Anjuli's Stuff\Final Thesis\Sample Run with sort of thesis inputs\tmp
01/24/2018 14:48:53  natcap.invest.coastal_blue_carbon.coastal_blue_carbon INFO     Starting Coastal Blue Carbon model run...
01/24/2018 14:48:54  root               ERROR    ---------------------------------------------------
01/24/2018 14:48:54  root               ERROR    ---------------------- ERROR ----------------------
01/24/2018 14:48:54  root               ERROR    ---------------------------------------------------
01/24/2018 14:48:54  root               ERROR    Error: exception found while running natcap.invest.coastal_blue_carbon.coastal_blue_carbon
01/24/2018 14:48:54  root               DEBUG    
01/24/2018 14:48:54  root               DEBUG    Build details
01/24/2018 14:48:54  root               DEBUG    Interpreter
01/24/2018 14:48:54  root               DEBUG    Current temp dir: D:\Users\Kix\Documents\Anjuli's Stuff\Final Thesis\Sample Run with sort of thesis inputs\tmp
01/24/2018 14:48:54  root               DEBUG    tempfile.tempdir: D:\Users\Kix\Documents\Anjuli's Stuff\Final Thesis\Sample Run with sort of thesis inputs\tmp
01/24/2018 14:48:54  root               DEBUG    
01/24/2018 14:48:54  root               DEBUG    System
01/24/2018 14:48:54  root               DEBUG    OS              : Windows-7-6.1.7601-SP1
01/24/2018 14:48:54  root               DEBUG    Processor architecture: x86
01/24/2018 14:48:54  root               DEBUG    FS encoding     : mbcs
01/24/2018 14:48:54  root               DEBUG    Preferred encoding: cp1252
01/24/2018 14:48:54  root               DEBUG    
01/24/2018 14:48:54  root               DEBUG    Python
01/24/2018 14:48:54  root               DEBUG    Version         : 2.7.9
01/24/2018 14:48:54  root               DEBUG    Build           : ('default', 'Dec 10 2014 12:24:55')
01/24/2018 14:48:54  root               DEBUG    Compiler        : MSC v.1500 32 bit (Intel)
01/24/2018 14:48:54  root               DEBUG    Implementation  : CPython
01/24/2018 14:48:54  root               DEBUG    Architecture    : 32bit
01/24/2018 14:48:54  root               DEBUG    Linkage format  : WindowsPE
01/24/2018 14:48:54  root               DEBUG    
01/24/2018 14:48:54  root               DEBUG    Packages
01/24/2018 14:48:54  root               DEBUG    Cython          : ?
01/24/2018 14:48:54  root               DEBUG    Numpy           : 1.11.2
01/24/2018 14:48:54  root               DEBUG    Scipy           : 0.16.1
01/24/2018 14:48:54  root               DEBUG    OSGEO           : 1.11.3
01/24/2018 14:48:54  root               DEBUG    Shapely         : 1.5.5
01/24/2018 14:48:54  root               DEBUG    InVEST          : 3.3.3
01/24/2018 14:48:54  root               DEBUG    
01/24/2018 14:48:54  root               DEBUG    
01/24/2018 14:48:54  root               DEBUG    Exception not environment-related
01/24/2018 14:48:54  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 620, in runModel
  File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.coastal_blue_carbon.coastal_blue_carbon", line 121, in execute
  File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.coastal_blue_carbon.coastal_blue_carbon", line 665, in get_inputs
  File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.coastal_blue_carbon.coastal_blue_carbon", line 814, in _get_lulc_trans_to_D_dicts
AttributeError: 'float' object has no attribute 'endswith'

Can somebody help, please? Thank you. The raster is .tif and I have just 5 classes of the seagrass map, with 2 classes of blue carbon habitat. Any help is appreciated.

Comments

  • Hi there, 

    Thanks for your post.  It looks like, from the last line in your error log, that the issue might be with the pixel type of your raster data.  As a starting point, check the format of your raster data (properties-->source-->pixel type in ArcGIS).  It should be unsigned integer.  Try converting the pixel type and running the model again. 

    Did you download the sample data with the model?  I like to start by running the sample data through the model to make sure the model works and I understand each input piece.  From there, I use my own data and refer back to the sample data to make sure the formatting is correct.  

    Please let me know if you have additional questions! 

    - Katherine 
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi @knottynut, it's also worth noting that the latest version of InVEST includes some updates to the coastal blue carbon model that might very well resolve this issue (it looks like you're using InVEST 3.3.3).  Perhaps an upgrade would help?
  • jdouglassjdouglass Administrator, NatCap Staff
    Oh, the latest version of InVEST can be found at http://naturalcapitalproject.org/invest
  • Thank you! The model run successfully after updating the software version and checking the raster format.
This discussion has been closed.