Coastal Vulnerability - KeyError: ‘Illegal field requested in GetField()’

Hi, i have a problem to run Invest. I try 3 differents WW3 vector files (mine, Sample and another ) and i have this message below. What can i do and if it’s possible sent me a file for WW3 with mediteranean? thank you.

02/13/2023 11:08:23 taskgraph.Task ERROR Something went wrong when adding task calculate wind exposure (4), 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 1166, in calculate_wind_exposure
File “natcap\invest\coastal_vulnerability.py”, line 3026, in _copy_point_vector_geom_to_gpkg
File “osgeo\ogr.py”, line 4328, in GetField
KeyError: ‘Illegal field requested in GetField()’
02/13/2023 11:08:23 natcap.invest.utils ERROR Exception while executing natcap.invest.coastal_vulnerability
Traceback (most recent call last):
File “natcap\invest\utils.py”, line 164, in prepare_workspace
File “invest\cli.py”, line 486, in main
File “natcap\invest\coastal_vulnerability.py”, line 520, 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 1166, in calculate_wind_exposure
File “natcap\invest\coastal_vulnerability.py”, line 3026, in _copy_point_vector_geom_to_gpkg
File “osgeo\ogr.py”, line 4328, in GetField
KeyError: ‘Illegal field requested in GetField()’

Hi @mesauros , thank you for posting here.

If you tried your own WW3 dataset instead of the sample data and still got this error message, it could be that the dataset is missing one of the required fields listed here: Coastal Vulnerability Model — InVEST documentation

If you can’t figure it out, feel free to share with me the WW3 dataset you are using.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.