Carbon model

Hi All
I have this error

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

I try changing type of field in the raster layer but it doesn´t work
I don´t know what to do
Could you help me please?

Comments

  • jdouglassjdouglass Administrator, NatCap Staff
    Hi @Maruoe, this error usually has to do with a value in a CSV column that couldn't be converted to a floating-point number.  If this is still an issue, could you attach your log file from the model run so that we can take a closer look at the error?
  • MauroeMauroe Member
    edited November 1
    Hi, thanks for your help this is the log

    Arguments:
    carbon_pools_path C:/carbon/carbon_pools_co_2012.csv
    lulc_cur_path C:/carbon/landuse90_co.tif
    workspace_dir C:\carbon


    11/01/2017 13:09:37 root INFO Logging will be saved to natcap.invest.carbon-log-2017-11-01--13_09_37.txt
    11/01/2017 13:09:37 root DEBUG Loaded the model from natcap.invest.carbon
    11/01/2017 13:09:37 root INFO Executing the loaded model
    11/01/2017 13:09:37 root INFO Running InVEST version "3.3.3"
    11/01/2017 13:09:37 root INFO Python architecture: ('32bit', 'WindowsPE')
    11/01/2017 13:09:37 root INFO Disk space remaining for workspace: 463.62 GB
    11/01/2017 13:09:37 root INFO Pointing temporary directory at the workspace at C:\carbon
    11/01/2017 13:09:37 root INFO Starting natcap.invest.carbon
    11/01/2017 13:09:37 root INFO Setting tempfile.tempdir to C:\carbon\tmp
    11/01/2017 13:09:37 natcap.invest.carbon INFO Building file registry
    11/01/2017 13:09:37 root ERROR ---------------------------------------------------
    11/01/2017 13:09:37 root ERROR ---------------------- ERROR ----------------------
    11/01/2017 13:09:37 root ERROR ---------------------------------------------------
    11/01/2017 13:09:37 root ERROR Error: exception found while running natcap.invest.carbon
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Build details
    11/01/2017 13:09:37 root DEBUG Interpreter
    11/01/2017 13:09:37 root DEBUG Current temp dir: C:\carbon\tmp
    11/01/2017 13:09:37 root DEBUG tempfile.tempdir: C:\carbon\tmp
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG System
    11/01/2017 13:09:37 root DEBUG OS : Windows-7-6.1.7601-SP1
    11/01/2017 13:09:37 root DEBUG Processor architecture: AMD64
    11/01/2017 13:09:37 root DEBUG FS encoding : mbcs
    11/01/2017 13:09:37 root DEBUG Preferred encoding: cp1252
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Python
    11/01/2017 13:09:37 root DEBUG Version : 2.7.9
    11/01/2017 13:09:37 root DEBUG Build : ('default', 'Dec 10 2014 12:24:55')
    11/01/2017 13:09:37 root DEBUG Compiler : MSC v.1500 32 bit (Intel)
    11/01/2017 13:09:37 root DEBUG Implementation : CPython
    11/01/2017 13:09:37 root DEBUG Architecture : 32bit
    11/01/2017 13:09:37 root DEBUG Linkage format : WindowsPE
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Packages
    11/01/2017 13:09:37 root DEBUG Cython : ?
    11/01/2017 13:09:37 root DEBUG Numpy : 1.11.2
    11/01/2017 13:09:37 root DEBUG Scipy : 0.16.1
    11/01/2017 13:09:37 root DEBUG OSGEO : 1.11.3
    11/01/2017 13:09:37 root DEBUG Shapely : 1.5.5
    11/01/2017 13:09:37 root DEBUG InVEST : 3.3.3
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG
    11/01/2017 13:09:37 root DEBUG Exception not environment-related
    11/01/2017 13:09:37 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.carbon", line 119, 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 2452, in get_lookup_from_table
    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.fileio", line 257, in __init__
    File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\pygeoprocessing.fileio", line 156, in read_table
    TypeError: float() argument must be a string or a number


    Post edited by Mauroe on
  • RichRich Administrator, NatCap Staff
    Hi, it looks like there's a value in your table that is not a number when there's supposed to be one. If you can spot it yourself, could you post your table on here (I don't know if that will work) or share it with me on Dropbox to richsharp@stanford.edu? I can take a look and post back whatever I can find.
Sign In or Register to comment.