Urban Flood Mitigation - KeyError

Dear all,
when running the Urban Flood Risk Mitigation I got the following error message while trying to calculate the damage to infrastructure. Do you have any idea about what the problem could be and how to sort it out?
Thanks in advance for your help.
Best regards,

Mauro

2020-08-20 14:52:36,657 Task.add_task(731) ERROR Something went wrong when adding task calculate damage to infrastructure in aoi (12), terminating taskgraph.
Traceback (most recent call last):
File “site-packages/taskgraph/Task.py”, line 697, in add_task
File “site-packages/taskgraph/Task.py”, line 1174, in _call
File “site-packages/natcap/invest/urban_flood_risk_mitigation.py”, line 606, in _calculate_damage_to_infrastructure_in_aoi
KeyError: None
2020-08-20 14:52:36,659 model._logged_target(1635) ERROR Exception while executing <function execute at 0x7fd76068d830>
Traceback (most recent call last):
File “site-packages/natcap/invest/ui/model.py”, line 1632, in _logged_target
File “site-packages/natcap/invest/urban_flood_risk_mitigation.py”, line 384, in execute
File “site-packages/taskgraph/Task.py”, line 697, in add_task
File “site-packages/taskgraph/Task.py”, line 1174, in _call
File “site-packages/natcap/invest/urban_flood_risk_mitigation.py”, line 606, in _calculate_damage_to_infrastructure_in_aoi
KeyError: None

Hi @Mauro,

Do you think you could attach the logfile here? It will give us a better understanding of what might be going wrong. Thanks!

Doug

Hi Doug,
sure: please find the log file attached.
Thanks.
BR

Mauro

InVEST-UrbanFloodRiskMitigation-log-2020-08-20–15_16_15.txt (20.1 KB)

Thanks Mauro,

Could you make sure that your built infrastructure vector and damage loss table have the same type values?

If this doesn’t look like the problem, could you possibly share a zip of your inputs either here via a link to Google Drive, dropbox, etc… or via direct message? My email is also ddenu@stanford.edu if that would work better and the zip isn’t over 25 MB.

Best,

Doug

Dear Doug,
sorry for my late reaction, I had 10 days off (finally!). I checked the infrastructure vector and actually one record had an empty field as for the type. It now seems to work: I will come back in case something is still wrong.
Thanks a lot for your support.
Best regards,

Mauro

1 Like

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