DelineateIt TypeError float is required

I try to use Delineit among inveset models, but I keep getting errors. Error message is TypeError: a float is required. In my opinion, entering a value for THRES HOLD ACCUMLATION item would solve the problem, but the error would be the same. I’d appreciate it if you could let me know the cause and the solution.

Hi @aliasgis -

You do need to enter a Threshold Flow Accumulation value - did you enter one and still get the same error? If so, please post the whole log file (.txt) that the model creates in the Workspace - that might have more information to help us understand what’s going wrong. Thanks.

~ Stacie

HI ,
The error message is as follows. Could you tell me where I can get three samples of DelineateITMODEL?
Thank you.
---------------------------message-------------------------------------------------------------------------------------------
07/10/2019 13:14:49 natcap.invest.utils INFO Writing log messages to C:\Users\Kim\Documents\delineateit_workspace\InVEST-DelineateIT-Watershed-Delineation-log-2019-07-10–13_14_49.txt
07/10/2019 13:14:49 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.routing.delineateit 3.6.0:
dem_uri F:/ndr/GDEM-10km-BW.tif
flow_threshold 1000
n_workers -1
outlet_shapefile_uri F:/OverlapAnalysis (1)/OverlapAnalysis/Input/PopulatedPlaces_WCVI.shp
results_suffix /output
snap_distance 13
workspace_dir C:\Users\Kim\Documents\delineateit_workspace

07/10/2019 13:14:49 natcap.invest.routing.delineateit INFO creating directory C:\Users\Kim\Documents\delineateit_workspace
07/10/2019 13:14:50 natcap.invest.pygeoprocessing_0_3_3.geoprocessing WARNING Warning the nodata value in F:/ndr/GDEM-10km-BW.tif is not set
07/10/2019 13:14:51 natcap.invest.pygeoprocessing_0_3_3.geoprocessing_cython WARNING None is passed in for the nodata value, failed to set any nodata value for new raster.
07/10/2019 13:14:51 natcap.invest.pygeoprocessing_0_3_3.geoprocessing WARNING Warning the nodata value in c:\users\kim\appdata\local\temp\tmpydbbyq is not set
07/10/2019 13:14:51 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x15CB1AF0>
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 1579, in _logged_target
File “C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\routing\delineateit.py”, line 79, 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\routing\routing.py”, line 406, in delineate_watershed
File “C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\pygeoprocessing_0_3_3\routing\routing.py”, line 325, in flow_direction_d_inf
File “src\natcap\invest\pygeoprocessing_0_3_3\routing\routing_core.pyx”, line 703, in natcap.invest.pygeoprocessing_0_3_3.routing.routing_core.flow_direction_inf
TypeError: a float is required
07/10/2019 13:14:51 natcap.invest.ui.model INFO Execution finished
07/10/2019 13:14:51 natcap.invest.utils INFO Elapsed time: 2.26s

Hi @aliasgis -

Thanks for including the log information. One thing I see is a warning that “the nodata value in F:/nde/GDEM-10km-BW.tif is not set”. I don’t know if this is creating the error, but have you tried setting the NoData value and see if it helps?

It’s curious that it’s saying that a float is required while doing flow direction. What is the data type of your DEM? I’d assume that it’s an integer or a float, but double-check to make sure.

And just a note that the Suffix is a string that is added to the end of the output filenames. So instead of “/output”, you should use just “output” and the result will be “watershed_output.shp”.

~ Stacie