Fisheries error "IndexError list index out of range"

Dear Natural Capital team,

I am having some problems running the fisheries model of InVEST. My shapefile has 27 clases… maybe the problem is there. See the log attached:

05/14/2019 15:00:53 natcap.invest.utils INFO Writing log messages to D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\fisheries\Datos_barcos_coordenadas\merluza\InVEST-Fisheries-log-2019-05-14–15_00_52.txt
05/14/2019 15:00:53 natcap.invest.ui.model Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.fisheries.fisheries 3.6.0:
alpha 5.77e6
aoi_uri D:/Users/albertonk91/Desktop/UAM master/LIFE_FER/fisheries/Datos_barcos_coordenadas/merluza/areas_merl_dis.shp
beta 2.885e6
do_batch False
harvest_units Weight
migr_cont False
n_workers -1
population_csv_uri D:/Users/albertonk91/Desktop/UAM master/LIFE_FER/fisheries/Datos_barcos_coordenadas/merluza/merluza_pop.csv
population_type Age-Based
recruitment_type Fixed
results_suffix merluza
sexsp No
spawn_units Weight
total_init_recruits 79427
total_recur_recruits 20041
total_timesteps 30
val_cont False
workspace_dir D:\Users\albertonk91\Desktop\UAM master\LIFE_FER\fisheries\Datos_barcos_coordenadas\merluza

05/14/2019 15:00:53 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x161414B0>
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\”, 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\fisheries\”, line 194, in execute
File “C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\fisheries\”, line 108, in fetch_args
File “C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\fisheries\”, line 176, in read_population_csvs
File “C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\fisheries\”, line 224, in read_population_csv
File “C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\env\lib\site-packages\natcap\invest\fisheries\”, line 357, in _parse_population_csv
IndexError: list index out of range
05/14/2019 15:00:53 natcap.invest.ui.model INFO Execution finished
05/14/2019 15:00:53 natcap.invest.utils INFO Elapsed time: 0.11s

Thanks in advanced


If it is helpful, I’ve revised the old forum searching for similarities with the problem so that I have tried with the new InVEST version. Next I have verified that the “Name” column in my shp file is “Name” instead “name” or “NAME”. The error persists…


It’s hard to say exactly what the issue might be here. Could you attach your inputs here (if they’re small) or email them to so I can take a look?


Thanks for sending your inputs. It looks like your population parameters file is the issue here, as semicolons are being used as the delimiter. The InVEST Fisheries model requires that commas be used as the delimiter. When I correct this and run the model with this new table (merluza_pop_nolarv_commas.csv (1.8 KB)), the model runs through.

Hope this helps!

The problem was in the csv file, it was semicolons instead commas… now it works.

Thank you very much James!