Carbon Storage Model Error.

sleventalslevental Member
edited October 2013 in Terrestrial Models
Hello,
In running the Carbon Storage and Sequestration model on Invest 2.5.4
I've been receiving the following error: “KeyError: 1.0”

Thanks for your help,

Simcha

Log:
Initializing...
10/21/2013 11:03:42 root DEBUG PATH: ['C:\\InVEST_2_5_4_x64\\invest-3-x64\\.']
10/21/2013 11:03:47 root DEBUG Loading carbon_biophysical from PATH
Arguments:
carbon_pools_uri O:/GIS_Project_Data/Regional/Ecological/NewYorkStatePriorityTeams/ClimateChange/AdaptationToolkit/New Order TEMP/Task 4 Current Habitats/4d/Terr carbon/Invest_Workspace/MGcarbon101813.dbf
lulc_cur_uri O:/GIS_Project_Data/Regional/Ecological/NewYorkStatePriorityTeams/ClimateChange/AdaptationToolkit/New Order TEMP/Task 4 Current Habitats/4d/Terr carbon/Invest_Workspace/LULC_Raster/Microgroup_orderC.tif
suffix run3
workspace_dir O:\GIS_Project_Data\Regional\Ecological\NewYorkStatePriorityTeams\ClimateChange\AdaptationToolkit\New Order TEMP\Task 4 Current Habitats\4d\Terr carbon\Invest_Workspace


10/21/2013 11:03:47 root INFO Logging will be saved to carbon_biophysical-log-2013-10-21--11_03_47.txt
10/21/2013 11:03:47 root DEBUG Loaded the model from invest_natcap.carbon.carbon_biophysical
10/21/2013 11:03:47 root INFO Executing the loaded model
10/21/2013 11:03:47 root INFO Running InVEST version "2.5.4"
10/21/2013 11:03:47 root INFO Disk space remaining for workspace: 228.92 GB
10/21/2013 11:03:48 carbon_biophysical DEBUG building carbon pools
10/21/2013 11:05:21 root INFO Disk space free: 229.45 GB
10/21/2013 11:05:21 root ERROR Error: a problem occurred while running the model
10/21/2013 11:05:21 root DEBUG Exception not environment-related
10/21/2013 11:05:21 root DEBUG Printing traceback
Traceback (most recent call last):
File "invest_natcap\iui\executor.pyc", line 435, in runModel
File "invest_natcap\carbon\carbon_biophysical.pyc", line 22, in execute
File "invest_natcap\carbon\carbon_biophysical.pyc", line 99, in execute_30
File "invest_natcap\raster_utils.pyc", line 2499, in vectorize_datasets
File "numpy\lib\function_base.pyc", line 1873, in __call__
File "numpy\lib\function_base.pyc", line 1939, in _vectorize_call
File "invest_natcap\carbon\carbon_biophysical.pyc", line 90, in map_carbon_pool
KeyError: 1.0
None

10/21/2013 11:05:21 root INFO Saving log file to O:\GIS_Project_Data\Regional\Ecological\NewYorkStatePriorityTeams\ClimateChange\AdaptationToolkit\New Order TEMP\Task 4 Current Habitats\4d\Terr carbon\Invest_Workspace\carbon_biophysical-log-2013-10-21--11_03_47.txt
10/21/2013 11:05:28 root ERROR Exiting due to failures

Comments

  • gverutesgverutes Moderator, NatCap Staff
    Hi Sim,

    I will review the GIS files you sent and let you know once I figure out the issue.
    -Gregg
  • gverutesgverutes Moderator, NatCap Staff
    Hi Sim,

    I just compared the values in your carbon pool table (DBF) with the input raster (TIF). The DBF LULC codes range from 5 - 108 and the input raster LULC codes range from 1 to 113. Since you don't have carbon storage values for 109-113 in the DBF the model is crashing. Please make sure that these two sets of codes link properly so that the model will correctly calculate carbon for each land cover type.

    -Gregg
  • Gregg, Thanks for your prompt response. I have 55 lines in both the TIF and the DBF. I made sure they both have LULC and they both have the same values. What else might be the issue?
    Thanks again,
    Simcha
  • Here is a link to the DBF and the TIF. https://www.dropbox.com/sh/1mmbmkhko8begt6/PrhuwRBQjD Though this tif is richer in data. Using look-up I created the TIF I shared with you so the value field is the LULC. Though I also tried running with this data and got the same error.

    Thanks again for your prompt response,

    Simcha
  • gverutesgverutes Moderator, NatCap Staff
    It's good that both the TIF and DBF have 55 lines, but the values from the files you sent do not match up completely. See attached screenshot. As an example of the issue, the TIF (left) has values 1-4 and the "LULC" column from the DBF (right) starts at 5. These numbers need to match exactly otherwise the model will crash. Make sure the value of each TIF pixel matches the appropriate code in the "LULC" column of the DBF table.
    1106 x 555 - 67K
  • Thanks again Gregg, I will make sure that the only value in the raster is the LULC. Though in the current raster the value LULC matches LULC in the dbf

    It might be that InVEST only looks for the value in the raster rather that to the field LULC. I guess it comes down to support of 16 and 32 bit rasters.

    I will let you know if this works.

    Thanks again,

    Simcha
  • I guess the good news is that I am getting a diferenct error:
    KeyError: -3.4028230607370965e+38

    Here are the files I am using:

    Initializing...
    10/23/2013 07:45:38 root DEBUG PATH: ['C:\\InVEST_2_5_4_x64\\invest-3-x64\\.']
    10/23/2013 07:45:38 root DEBUG Loading carbon_biophysical from PATH
    Arguments:
    carbon_pools_uri O:/GIS_Project_Data/Regional/Ecological/NewYorkStatePriorityTeams/ClimateChange/AdaptationToolkit/New Order TEMP/Task 4 Current Habitats/4d/Terr carbon/CarbonfromLevental/MGcarbon101813.dbf
    lulc_cur_uri O:/GIS_Project_Data/Regional/Ecological/NewYorkStatePriorityTeams/ClimateChange/AdaptationToolkit/New Order TEMP/Task 4 Current Habitats/4d/Terr carbon/mg_lulc1.tif
    suffix run
    workspace_dir C:\InvestWS


    10/23/2013 07:45:38 root INFO Logging will be saved to carbon_biophysical-log-2013-10-23--07_45_38.txt
    10/23/2013 07:45:38 root DEBUG Loaded the model from invest_natcap.carbon.carbon_biophysical
    10/23/2013 07:45:38 root INFO Executing the loaded model
    10/23/2013 07:45:38 root INFO Running InVEST version "2.5.4"
    10/23/2013 07:45:38 root INFO Disk space remaining for workspace: 359.66 GB
    10/23/2013 07:45:38 carbon_biophysical INFO creating directory C:\InvestWS\output
    10/23/2013 07:45:38 carbon_biophysical INFO creating directory C:\InvestWS\intermediate
    10/23/2013 07:45:38 carbon_biophysical DEBUG building carbon pools
    10/23/2013 07:46:31 root INFO Disk space free: 356.89 GB
    10/23/2013 07:46:31 root ERROR Error: a problem occurred while running the model
    10/23/2013 07:46:31 root DEBUG Exception not environment-related
    10/23/2013 07:46:31 root DEBUG Printing traceback
    Traceback (most recent call last):
    File "invest_natcap\iui\executor.pyc", line 435, in runModel
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 22, in execute
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 99, in execute_30
    File "invest_natcap\raster_utils.pyc", line 2499, in vectorize_datasets
    File "numpy\lib\function_base.pyc", line 1873, in __call__
    File "numpy\lib\function_base.pyc", line 1933, in _vectorize_call
    File "numpy\lib\function_base.pyc", line 1897, in _get_ufunc_and_otypes
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 90, in map_carbon_pool
    KeyError: -3.4028230607370965e+38
    None

    10/23/2013 07:46:31 root INFO Saving log file to C:\InvestWS\carbon_biophysical-log-2013-10-23--07_45_38.txt
    10/23/2013 07:46:31 root ERROR Exiting due to failures
  • gverutesgverutes Moderator, NatCap Staff
    This was resolved. Sim figured out that the DBF column "LULC" needs to have integer values and not string.
  • Hello,
    In running the Carbon Storage and Sequestration model on Invest 2.5.6
    I've been receiving the following error: “KeyError: 11.0” for the stand alone application. When I run the ArcGIS tool, I get a message saying "error reclassing c_dead"

    Thanks for your help,


    Chelsey

    The following is the log and error messages.

    Arguments:
    V 43.0
    c 0.0
    carbon_pools_uncertain_uri C:\InVEST_2_5_6_x86\Carbon\Input\carbon_pools_samp_uncertain.csv
    carbon_pools_uri C:/InVEST_2_5_6_x86/Carbon/Aiton_final/Input/carbon_pools_samp.csv
    carbon_price_units Carbon (C)
    confidence_threshold 90.0
    do_biophysical True
    do_uncertainty False
    do_valuation True
    lulc_cur_uri C:/InVEST_2_5_6_x86/Carbon/Aiton_final/Input/lc2005/hdr.adf
    lulc_cur_year 2005
    lulc_fut_uri C:/InVEST_2_5_6_x86/Carbon/Aiton_final/Input/a12050/hdr.adf
    lulc_fut_year 2050
    r 7
    suffix 1
    workspace_dir C:\InVEST_2_5_6_x86\Carbon\Aiton_final


    11/20/2013 14:01:25 root INFO Logging will be saved to carbon_combined-log-2013-11-20--14_01_25.txt
    11/20/2013 14:01:25 root DEBUG Loaded the model from invest_natcap.carbon.carbon_combined
    11/20/2013 14:01:25 root INFO Executing the loaded model
    11/20/2013 14:01:25 root INFO Running InVEST version "2.5.6"
    11/20/2013 14:01:25 root INFO Python architecture: ('32bit', 'WindowsPE')
    11/20/2013 14:01:25 root INFO Disk space remaining for workspace: 239.13 GB
    11/20/2013 14:01:25 root INFO Pointing temporary directory at the workspace at C:\InVEST_2_5_6_x86\Carbon\Aiton_final
    11/20/2013 14:01:25 root INFO Upddating os.environ["TMP"]=C:\InVEST_2_5_6_x86\Carbon\Aiton_final\tmp to C:\InVEST_2_5_6_x86\Carbon\Aiton_final
    11/20/2013 14:01:25 root INFO Upddating os.environ["TEMP"]=C:\InVEST_2_5_6_x86\Carbon\Aiton_final\tmp to C:\InVEST_2_5_6_x86\Carbon\Aiton_final
    11/20/2013 14:01:25 root INFO Upddating os.environ["TMPDIR"]=C:\InVEST_2_5_6_x86\Carbon\Aiton_final\tmp to C:\InVEST_2_5_6_x86\Carbon\Aiton_final
    11/20/2013 14:01:25 carbon_combined INFO Executing biophysical model.
    11/20/2013 14:01:25 carbon_utils DEBUG Creating directory C:\InVEST_2_5_6_x86\Carbon\Aiton_final\output
    11/20/2013 14:01:25 carbon_utils DEBUG Creating directory C:\InVEST_2_5_6_x86\Carbon\Aiton_final\intermediate
    11/20/2013 14:01:25 carbon_biophysical INFO Mapping carbon for cur scenario.
    11/20/2013 14:01:26 root INFO Disk space free: 239.13 GB
    11/20/2013 14:01:26 root ERROR Error: a problem occurred while running the model
    11/20/2013 14:01:26 root DEBUG Exception not environment-related
    11/20/2013 14:01:26 root DEBUG Printing traceback
    Traceback (most recent call last):
    File "invest_natcap\iui\executor.pyc", line 455, in runModel
    File "invest_natcap\carbon\carbon_combined.pyc", line 20, in execute
    File "invest_natcap\carbon\carbon_combined.pyc", line 84, in execute_30
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 24, in execute
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 110, in execute_30
    File "invest_natcap\raster_utils.pyc", line 2488, in vectorize_datasets
    File "numpy\lib\function_base.pyc", line 1881, in __call__
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 101, in map_carbon_pool
    KeyError: 11.0
    None

  • DougDoug Administrator, NatCap Staff
    Hello,

    The 'KeyError 11.0' leads me to think that your LULC raster might have floating point values. Could you check and make sure that indeed the LULC raster is an integer raster? Also it wouldn't hurt to make sure the carbon pool CSV files have integers for the 'lucode' field. Let me know if any of this helps, otherwise we can look deeper. Thanks.
  • DougDoug Administrator, NatCap Staff
    The other thing to confirm is that you have a matching LULC code in your raster for every 'lucode' in the carbon pool table. Hope this helps.
  • Doug,

    You were correct and very helpful, I had some string values instead of integers in my CSV file. I have been able to run the model successfully. I very much appreciate your help.
    Thanks
    Chelsey
  • Hi there,
    I have problems checking out the carbon storage module (Version 2.5.6, stand-alone). Just started using invest, so I am thankful for any helping comments.
    Thanks in advance,
    Nele

    carbon_pools_uri C:/invest/carbon/input/cclass.dbf
    do_biophysical True
    do_uncertainty False
    do_valuation False
    lulc_cur_uri C:/invest/carbon/input/sg_cclass.ovr
    workspace_dir C:\invest\carbon


    12/02/2013 14:33:09 root INFO Logging will be saved to carbon_combined-log-2013-12-02--14_33_09.txt
    12/02/2013 14:33:09 root DEBUG Loaded the model from invest_natcap.carbon.carbon_combined
    12/02/2013 14:33:09 root INFO Executing the loaded model
    12/02/2013 14:33:09 root INFO Running InVEST version "2.5.6"
    12/02/2013 14:33:09 root INFO Python architecture: ('64bit', 'WindowsPE')
    12/02/2013 14:33:09 root INFO Disk space remaining for workspace: 59.55 GB
    12/02/2013 14:33:10 root INFO Pointing temporary directory at the workspace at C:\invest\carbon
    12/02/2013 14:33:10 root INFO Upddating os.environ["TMP"]=C:\Users\N3EEF~1.SUT\AppData\Local\Temp to C:\invest\carbon
    12/02/2013 14:33:10 root INFO Upddating os.environ["TEMP"]=C:\Users\N3EEF~1.SUT\AppData\Local\Temp to C:\invest\carbon
    12/02/2013 14:33:10 root INFO Setting os.environ["TMPDIR"]=C:\invest\carbon
    12/02/2013 14:33:10 carbon_combined INFO Executing biophysical model.
    12/02/2013 14:33:10 carbon_biophysical INFO Mapping carbon for cur scenario.
    12/02/2013 14:33:10 root INFO Disk space free: 59.55 GB
    12/02/2013 14:33:10 root ERROR Error: a problem occurred while running the model
    12/02/2013 14:33:10 root DEBUG Exception not environment-related
    12/02/2013 14:33:10 root DEBUG Printing traceback
    Traceback (most recent call last):
    File "invest_natcap\iui\executor.pyc", line 455, in runModel
    File "invest_natcap\carbon\carbon_combined.pyc", line 20, in execute
    File "invest_natcap\carbon\carbon_combined.pyc", line 84, in execute_30
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 24, in execute
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 110, in execute_30
    File "invest_natcap\raster_utils.pyc", line 2451, in vectorize_datasets
    File "invest_natcap\raster_utils.pyc", line 2278, in align_dataset_list
    File "invest_natcap\raster_utils.pyc", line 2135, in assert_datasets_in_same_projection
    DatasetUnprojected: These datasets are unprojected set(['C:/invest/carbon/input/sg_cclass.ovr'])
    None
  • gverutesgverutes Moderator, NatCap Staff
    Hi Nele,

    Based on the last line of the error message, it appears that your input layer (sg_cclass) is not projected with meters as the linear unit. In order for the model to accurately calculate carbon storage and change over time, it requires your input land use/land cover map to be projected. Please use your GIS to project this raster and grid and try again. If you continue to experience issue let us know.

    -Gregg
  • Hi Gregg,
    thanks for the QUICK support. I thought the same, but the file has already a spatial reference (ETRS_1989_UTM_Zone_32N, in meters).
    Could you think of something else?
    Ahoi,
    Nele
  • Hi again,
    I found a solution by choosing another raster format (.img instead of GRID). Now it worked :)
    Surely, I'll be back soon with more questions...
    Thanks so far!
  • Hello,

    I am trying to run the Carbon (x64) standalone tool, but I keep getting the error “KeyError: 33.0” . I have tried and checked everything that has been suggested in this thread but still I can’t manage to find the error. Can you please help me? Here is a link to the .tif and the .csv (and also its .dbf): https://db.tt/yRatsMYc . Thank you so much for your time!

    Benedetta
  • RichRich Administrator, NatCap Staff
    Hi Benedetta, it looks like you have an LUCODE of 33 in your .tif, but no corresponding code in your carbon_pools_MI_new.csv table. Adding that entry to your table should fix your problem.
  • That was it Rich, thank you so so much for your quick and helpful reply!
  • Hello,
    I'm trying to run the carbon model and receive a Key error 18 on the standalone version, and error reclassing C_below on Arcmap. Thanks in advance for your help

    Cecilia

    carbon_pools_uri C:/Users/Lab4.5/Documents/Cecilia/Carbon/input/carbonpoolsarc.csv
    do_biophysical True
    do_uncertainty False
    do_valuation False
    lulc_cur_uri C:/Users/Lab4.5/Documents/Cecilia/Basedata/CLC06WA89_r1.img
    workspace_dir C:\Users\Lab4.5\Documents\Cecilia\Carbon


    01/09/2014 15:17:14 root INFO Logging will be saved to carbon_combined-log-2014-01-09--15_17_14.txt
    01/09/2014 15:17:14 root DEBUG Loaded the model from invest_natcap.carbon.carbon_combined
    01/09/2014 15:17:14 root INFO Executing the loaded model
    01/09/2014 15:17:14 root INFO Running InVEST version "2.5.6"
    01/09/2014 15:17:14 root INFO Python architecture: ('32bit', 'WindowsPE')
    01/09/2014 15:17:14 root INFO Disk space remaining for workspace: 393.67 GB
    01/09/2014 15:17:15 root INFO Pointing temporary directory at the workspace at C:\Users\Lab4.5\Documents\Cecilia\Carbon
    01/09/2014 15:17:15 root INFO Upddating os.environ["TMP"]=C:\Users\Lab4.5\AppData\Local\Temp to C:\Users\Lab4.5\Documents\Cecilia\Carbon
    01/09/2014 15:17:15 root INFO Upddating os.environ["TEMP"]=C:\Users\Lab4.5\AppData\Local\Temp to C:\Users\Lab4.5\Documents\Cecilia\Carbon
    01/09/2014 15:17:15 root INFO Setting os.environ["TMPDIR"]=C:\Users\Lab4.5\Documents\Cecilia\Carbon
    01/09/2014 15:17:15 carbon_combined INFO Executing biophysical model.
    01/09/2014 15:17:15 carbon_biophysical INFO Mapping carbon for cur scenario.
    01/09/2014 15:17:15 root INFO Disk space free: 393.67 GB
    01/09/2014 15:17:15 root ERROR Error: a problem occurred while running the model
    01/09/2014 15:17:15 root DEBUG Exception not environment-related
    01/09/2014 15:17:15 root DEBUG Printing traceback
    Traceback (most recent call last):
    File "invest_natcap\iui\executor.pyc", line 455, in runModel
    File "invest_natcap\carbon\carbon_combined.pyc", line 20, in execute
    File "invest_natcap\carbon\carbon_combined.pyc", line 84, in execute_30
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 24, in execute
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 110, in execute_30
    File "invest_natcap\raster_utils.pyc", line 2488, in vectorize_datasets
    File "numpy\lib\function_base.pyc", line 1881, in __call__
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 101, in map_carbon_pool
    KeyError: 18.0
    None
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Cecelia,

    Usually this means that the model expected a value of 18 in your carbon pools table, but couldn't find it. Could you verify that you have a row for the land use code 18?

    James
  • Thank you, error was solved!
  • Hello again dear InVestors,
    my results from running the carbon-tool (2.5.6 stand-alone version) are a bit surprising to me. The input values ranged from 0.44 to 77.20 tons. The output raster contained values from 0 - 0.403. I attached a file with the pics and would be grateful for any helping comments!
    Thanks in advance,
    Nele
  • Hmmm, right after posting it, I found the solution: It is because of the raster resolution which is finer than one ha.
    Sorry for bothering u, but it helped :)
    Nele
  • RichRich Administrator, NatCap Staff
    Nele, it could have been worse: http://xkcd.com/979/
  • I'm getting the following this error AttributeError: 'NoneType' object has no attribute 'GetProjection'. find the whole error log as below
    any one of you kindly help me in ratifying the error.
    thanks in anticipation for the solution.
    looking forward for your enlightening reciprocation.

    Arguments:
    carbon_pools_uri I:/InVEST_2_6_0_x86/Carbon/Input/carbon.csv
    do_biophysical True
    do_uncertainty False
    do_valuation False
    lulc_cur_uri I:/InVEST_2_6_0_x86/Base_Data/Terrestrial/lu11.img
    lulc_cur_year 2011
    lulc_fut_uri
    lulc_fut_year
    workspace_dir I:\InVEST_2_6_0_x86\Carbon


    04/10/2014 11:00:01 root INFO Logging will be saved to carbon_combined-log-2014-04-10--11_00_01.txt
    04/10/2014 11:00:01 root DEBUG Loaded the model from invest_natcap.carbon.carbon_combined
    04/10/2014 11:00:01 root INFO Executing the loaded model
    04/10/2014 11:00:01 root INFO Running InVEST version "2.6.0"
    04/10/2014 11:00:01 root INFO Python architecture: ('32bit', 'WindowsPE')
    04/10/2014 11:00:01 root INFO Disk space remaining for workspace: 55.74 GB
    04/10/2014 11:00:10 root INFO Pointing temporary directory at the workspace at I:\InVEST_2_6_0_x86\Carbon
    04/10/2014 11:00:10 root INFO Upddating os.environ["TMP"]=C:\Users\Shiva\AppData\Local\Temp to I:\InVEST_2_6_0_x86\Carbon
    04/10/2014 11:00:10 root INFO Upddating os.environ["TEMP"]=C:\Users\Shiva\AppData\Local\Temp to I:\InVEST_2_6_0_x86\Carbon
    04/10/2014 11:00:10 root INFO Setting os.environ["TMPDIR"]=I:\InVEST_2_6_0_x86\Carbon
    04/10/2014 11:00:10 root INFO Starting carbon_combined
    04/10/2014 11:00:10 carbon_combined INFO Executing biophysical model.
    04/10/2014 11:00:10 root ERROR ---------------------------------------------------
    04/10/2014 11:00:10 root ERROR ---------------------- ERROR ----------------------
    04/10/2014 11:00:10 root ERROR ---------------------------------------------------
    04/10/2014 11:00:10 root ERROR Error: exception found while running carbon_combined
    04/10/2014 11:00:10 root DEBUG
    04/10/2014 11:00:10 root DEBUG Build details
    04/10/2014 11:00:10 root DEBUG System
    04/10/2014 11:00:10 root DEBUG OS : Windows-7-6.1.7600
    04/10/2014 11:00:10 root DEBUG Processor architecture: AMD64
    04/10/2014 11:00:10 root DEBUG FS encoding : mbcs
    04/10/2014 11:00:10 root DEBUG
    04/10/2014 11:00:10 root DEBUG Python
    04/10/2014 11:00:10 root DEBUG Version : 2.7.3
    04/10/2014 11:00:10 root DEBUG Build : ('default', 'Apr 10 2012 23:31:26')
    04/10/2014 11:00:10 root DEBUG Compiler : MSC v.1500 32 bit (Intel)
    04/10/2014 11:00:10 root DEBUG Implementation : CPython
    04/10/2014 11:00:10 root DEBUG Architecture : 32bit
    04/10/2014 11:00:10 root DEBUG Linkage format : WindowsPE
    04/10/2014 11:00:10 root DEBUG
    04/10/2014 11:00:10 root DEBUG Packages
    04/10/2014 11:00:10 root DEBUG Cython : ?
    04/10/2014 11:00:10 root DEBUG Numpy : 1.7.0
    04/10/2014 11:00:10 root DEBUG Scipy : 0.11.0
    04/10/2014 11:00:10 root DEBUG OSGEO : 1.10.1
    04/10/2014 11:00:10 root DEBUG Shapely : 1.2.18
    04/10/2014 11:00:10 root DEBUG InVEST : 2.6.0
    04/10/2014 11:00:10 root DEBUG
    04/10/2014 11:00:10 root DEBUG
    04/10/2014 11:00:10 root DEBUG Exception not environment-related
    04/10/2014 11:00:10 root DEBUG Printing traceback
    Traceback (most recent call last):
    File "invest_natcap\iui\executor.pyc", line 523, in runModel
    File "invest_natcap\carbon\carbon_combined.pyc", line 20, in execute
    File "invest_natcap\carbon\carbon_combined.pyc", line 84, in execute_30
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 24, in execute
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 84, in execute_30
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 283, in _compute_carbon_pools
    File "invest_natcap\carbon\carbon_biophysical.pyc", line 322, in _compute_cell_area_ha
    File "invest_natcap\raster_utils.pyc", line 153, in get_cell_size_from_uri
    AttributeError: 'NoneType' object has no attribute 'GetProjection'
    None
  • DougDoug Administrator, NatCap Staff
    I can't be certain but this error usually indicates that a Raster input path cannot be found, thus 'NoneType' object. Is it possible that one of your raster paths isn't quite right? There could be a bug in the User Interface validation where a raster input is really 'Required', but not saying so and perhaps you have left one of those fields blank?

    I would first check your raster paths to make sure they are correct, then I would look at the user's guide or help text to see which raster inputs are required. Hope this helps!

    Doug
  • RichRich Administrator, NatCap Staff
    Doug's right, and there might be a bonus bug on there from the UI. Sometimes if sequestration is checked off when the model launches it still tries to calculate sequestration in the computational core. Any chance you could click "Calculate sequestration" on and off and re-run?

    Also I'm going to close this issue here since it's about several unique carbon model errors. If you're still having this problem do you mind opening up a new thread?
This discussion has been closed.