# Urban Flood Risk Mitigation: KeyError: 'cn\_a'

**URL:** <https://community.naturalcapitalalliance.org/t/urban-flood-risk-mitigation-keyerror-cn-a/2902>\
**Category:** Software Support\
**Tags:** urban-flood\
**Created:** [July 14, 2022, 12:39am UTC](https://community.naturalcapitalalliance.org/t/urban-flood-risk-mitigation-keyerror-cn-a/2902 "2022-07-14T00:39:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeanGonzaga](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@GeanGonzaga](https://community.naturalcapitalalliance.org/u/GeanGonzaga)\
**Post date:** [July 14, 2022, 12:39am UTC](https://community.naturalcapitalalliance.org/t/urban-flood-risk-mitigation-keyerror-cn-a/2902/1 "2022-07-14T00:39:05Z")

</div>

Hello guys,

I’m trying to run Urban Flood Risk Mitigation to use it for my master’s thesis. However, I’m new to InVEST tools and I’m not able to get around this error (KeyError: ‘cn\_a’). By the naming, I believe it is some slip in the biophysical table. I have already used two different nominations for the Curve Number column, namely: “cn\_c” and “cn\_3” in order to represent the Hydrological Group C of soils.

can you help me? Thanks

[InVEST-natcap.invest.urban\_flood\_risk\_mitigation-log-2022-07-13–21\_24\_51.txt](https://community.naturalcapitalalliance.org/uploads/short-url/bmWWTQxQ3LOKyzVKILW8WfPshgf.txt) (2.2 KB)  
[Input\_data.zip](https://community.naturalcapitalalliance.org/uploads/short-url/4U6W0VdqRuFiKSbdPfQbuVI4ZI6.zip) (117.1 KB)

---

<div class="post-metadata">

**Author:** ![jdouglass](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/jdouglass/32/9_2.png) [@jdouglass](https://community.naturalcapitalalliance.org/u/jdouglass)\
**Post date:** [July 14, 2022, 6:58pm UTC](https://community.naturalcapitalalliance.org/t/urban-flood-risk-mitigation-keyerror-cn-a/2902/2 "2022-07-14T18:58:40Z")

</div>

Hi @GeanGonzaga ,

You’re exactly right, this looks to be a formatting issue in your biophysical table. As mentioned in the [user’s guide](https://storage.googleapis.com/releases.naturalcapitalproject.org/invest-userguide/latest/urban_flood_mitigation.html#data-needs), you’ll need to add these columns: “cn\_a”, “cn\_b”, “cn\_c”, and “cn\_d”. The “lucode” column that you have in the table is also needed, so be sure to keep that there.

Hope this helps, and let us know if you have any other questions!  
James

---

<div class="post-metadata">

**Author:** ![GeanGonzaga](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@GeanGonzaga](https://community.naturalcapitalalliance.org/u/GeanGonzaga)\
**Post date:** [July 17, 2022, 9:48pm UTC](https://community.naturalcapitalalliance.org/t/urban-flood-risk-mitigation-keyerror-cn-a/2902/3 "2022-07-17T21:48:11Z")

</div>

Thank you my friend. I did as you said and it worked.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/2X/8/8d95591aa074da87ea0fdd61ca47c1c3c0588aa7.png) [@system](https://community.naturalcapitalalliance.org/u/system)\
**Post date:** [July 24, 2022, 9:48pm UTC](https://community.naturalcapitalalliance.org/t/urban-flood-risk-mitigation-keyerror-cn-a/2902/4 "2022-07-24T21:48:34Z")

</div>

Closed on July 24, 2022, 9:48pm UTC

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