You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File “site-packages\natcap\invest\ui\execution.py”, line 68, in run
File “site-packages\natcap\invest\ui\model.py”, line 1649, in _logged_target
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 241, in execute
File “site-packages\taskgraph\Task.py”, line 747, in add_task
File “site-packages\taskgraph\Task.py”, line 1234, in _call
File “site-packages\pygeoprocessing\geoprocessing.py”, line 438, in raster_calculator
File “site-packages\natcap\invest\urban_flood_risk_mitigation.py”, line 775, in _lu_to_cn_op
File “site-packages\scipy\sparse_index.py”, line 35, in getitem
File “site-packages\scipy\sparse_index.py”, line 139, in _validate_indices
File “site-packages\scipy\sparse_index.py”, line 171, in _asindices
IndexError: index (127) out of range
Second, when I tried to reproduce this error by modifying the sample data, I accidentally found a related bug. So long as the lucode column in the biophysical table contains a row with an lucode >= to largest int value in the LULC raster, we don't even see this IndexError. The model will complete successfully even when many/all of the LULC values are missing from the biophysical table. Presumably the results are invalid in this case.
To reproduce, edit the sample data table to be like this:
lucode,Description,NEH type (to define CN),CN_A,CN_B,CN_C,CN_D,SW_type,EMC
24,Tundra,,1,1,1,1,3000,0
This all seems a byproduct of using a sparse matrix with indices defined based on the lucode values found in the table.
The text was updated successfully, but these errors were encountered:
First, a user reported a cryptic IndexError when the biophysical table was missing values in the LULC raster. https://community.naturalcapitalproject.org/t/urban-flood-risk-mitigation-indexerror/2215/3
Second, when I tried to reproduce this error by modifying the sample data, I accidentally found a related bug. So long as the lucode column in the biophysical table contains a row with an lucode >= to largest int value in the LULC raster, we don't even see this
IndexError
. The model will complete successfully even when many/all of the LULC values are missing from the biophysical table. Presumably the results are invalid in this case.To reproduce, edit the sample data table to be like this:
This all seems a byproduct of using a sparse matrix with indices defined based on the lucode values found in the table.
The text was updated successfully, but these errors were encountered: