Error running carbon model

Hello!

I recently tried to run the carbon model but I can not due to an error generated. I thought it could be the biophysical table so I compared it with the test data, and even then the error was still occurring. Then verify the information about the raster I found differences and made an adjustment to the input raster (my raster is in tif format, adjust the parameters of the raster taking as reference the data of the test raster. I changed the pixel depth from 8 bits to 32 bits, the pixel type: from unsiged to signed, however I could not modify the source type from thematic to generic as in the test raster) but the error persists, could indicate me how I could find a solution.

Here is a detail of the error generated

Initializing...

Showing messages with level INFO and higher

08/13/2018 17:29:35 natcap.invest.utils INFO Writing log messages to D:\Invest\InVEST-InVEST-Carbon-Model-log-2018-08-13--17_29_35.txt

08/13/2018 17:29:35 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

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\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

08/13/2018 17:29:35 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

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\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

08/13/2018 17:29:35 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

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\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

08/13/2018 17:29:35 natcap.invest.ui.model Level 100 Starting model with parameters:

Arguments for InVEST natcap.invest.carbon 3.4.4:

calc_sequestration False

carbon_pools_path D:/Invest/Invest_text_13_8.csv

do_redd False

do_valuation False

lulc_cur_path D:/Invest/mosaic13ago1.tif

results_suffix

workspace_dir D:\Invest

 

08/13/2018 17:29:36 natcap.invest.carbon INFO Building file registry

08/13/2018 17:29:36 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

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\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

08/13/2018 17:29:36 natcap.invest.ui.usage ERROR Error when transforming coordinates: local variable 'spatial_ref' referenced before assignment

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\usage.py", line 176, in _merge_local_bounding_boxes

UnboundLocalError: local variable 'spatial_ref' referenced before assignment

08/13/2018 17:29:36 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x0E696370>

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\carbon.py", line 122, in execute

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 2448, in get_lookup_from_table

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\fileio.py", line 257, in __init__

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\fileio.py", line 156, in read_table

TypeError: float() argument must be a string or a number

08/13/2018 17:29:36 natcap.invest.ui.model INFO Execution finished

08/13/2018 17:29:36 natcap.invest.utils INFO Elapsed time: 0.62s

08/13/2018 17:29:36 natcap.invest.ui.execution ERROR Target <function _logged_target at 0x0E696930> 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\carbon.py", line 122, in execute

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\geoprocessing.py", line 2448, in get_lookup_from_table

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\fileio.py", line 257, in __init__

File "c:\users\natcap-servers\jenkins-home\workspace\natcap.invest\label\gce-windows-1\release_env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\fileio.py", line 156, in read_table

TypeError: float() argument must be a string or a number

08/13/2018 17:29:36 natcap.invest.ui.execution INFO Execution finished


Jazmín

Comments

  • swolnyswolny Member, NatCap Staff
    Hi Jazmin -

    The LULC raster should be in integer format (it shouldn't matter what the pixel depth is.) And the carbon pool table values should be floating point. If your LULC is integer, look more closely at the column values in the carbon pool table. Also make sure that the column values are actually separated by commas (not periods or anything else.)

    ~ Stacie
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Jazmin, Could you attach your carbon pools table to this thread so
    we can take a look?  Thanks!
  • Hello Stacie and Douglas! Thank you very much for the help, in fact the problem was the biophysical table. I already managed to run the model :)

    Jazmín 
This discussion has been closed.