Coastal vulnerability: 'ERROR - Something went wrong when adding task interpolate sea-level rise values'

Description

I’m trying to run a coastal vulnerability model for Puerto Rico, but it gives me an error related to my sea level rise layer. The rest of the layers gave no errors and the model runs successfully when the SLR layer is removed. The full error is pasted at the bottom of this post. The SLR layer consists of a shapefile with 8 points on the coast that give the mean rate of SLR in meters/year in a field in the attribute table. Does anyone know how I can change the SLR layer to resolve the error? Thanks!

Log file (error on line 1205)

InVEST-natcap.invest.coastal_vulnerability-log-2022-07-29–00_05_17.txt (176.2 KB)

InVEST version

3.11.0

Error

2022-07-29 00:09:57,289 (natcap.invest.coastal_vulnerability) coastal_vulnerability.interpolate_sealevelrise_points(1003) INFO Interpolate sea-level rise values to shore points
2022-07-29 00:09:57,382 (taskgraph.Task) Task.add_task(706) ERROR Something went wrong when adding task interpolate sea-level rise values (18), terminating taskgraph.
Traceback (most recent call last):
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\coastal_vulnerability.py”, line 1052, in interpolate_sealevelrise_points
TypeError: float() argument must be a string or a real number, not ‘NoneType’
2022-07-29 00:09:57,383 (natcap.invest.utils) utils.prepare_workspace(167) ERROR Exception while executing natcap.invest.coastal_vulnerability
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 165, in prepare_workspace
File “natcap\invest\cli.py”, line 486, in main
File “natcap\invest\coastal_vulnerability.py”, line 633, in execute
File “taskgraph\Task.py”, line 674, in add_task
File “taskgraph\Task.py”, line 1093, in _call
File “natcap\invest\coastal_vulnerability.py”, line 1052, in interpolate_sealevelrise_points
TypeError: float() argument must be a string or a real number, not ‘NoneType’

Hi @maxper -

Can you also post your sea level rise shapefile so we can check it out? Thanks.

~ Stacie

Hi @swolny, it won’t let me attach the shapefile because it’s not an accepted file format, but here’s a screenshot of what it looks like:

Here’s the attribute table exported as a csv (Amount field = meters/year rise):
slr_attribute_table.csv (2.6 KB)

I think you should be able to zip up all of the required files and attach the zipfile, if it’s not huge.

Looking at the attribute table, it’s not obvious what the problem is with the Amount field, but I do wonder if something is getting thrown off by two of the other fields having quoted material in them. For the heck of it, could you try deleting the Name and PopupInfo fields and see if that changes anything?

~ Stacie