# Coastal Vulnerability Error: Could not open habitat datasets

**URL:** <https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620>\
**Category:** Software Support\
**Tags:** coastal-vulnerability\
**Created:** [March 24, 2022, 9:24pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620 "2022-03-24T21:24:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nomsy](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@Nomsy](https://community.naturalcapitalalliance.org/u/Nomsy)\
**Post date:** [March 24, 2022, 9:24pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/1 "2022-03-24T21:24:13Z")

</div>

[InVEST-Coastal-Vulnerability-log-2022-03-24–22\_17\_43.txt](https://community.naturalcapitalalliance.org/uploads/short-url/mabAVBFW5nmVkFuCTFkfvVaU71Z.txt) (6.0 KB)  
Hi, the above is the error message I get when I run the invest coastal vulnerability model. Please, What do I do?

---

<div class="post-metadata">

**Author:** ![swolny](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/swolny/32/181_2.png) [@swolny](https://community.naturalcapitalalliance.org/u/swolny)\
**Post date:** [March 25, 2022, 2:44am UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/2 "2022-03-25T02:44:45Z")

</div>

Hi @Nomsy -

The error message says this:

_Could not open these datasets referenced in C:/Users/Nomsy PC/Desktop/Papers on CC Adaptation and Mitigation and Ecosystem based approaches/Sample\_data\_Invest/RiversState\_Habitat/Natural\_Habitats.csv:C:/Users/Nomsy PC/Desktop/Papers on CC Adaptation and Mitigation and Ecosystem based approaches/Sample\_data\_Invest/RiversState\_Habitat\Mangrove.shp_

So did you verify that “Mangrove.shp” is actually located in the folder “C:/Users/Nomsy PC/Desktop/Papers on CC Adaptation and Mitigation and Ecosystem based approaches/Sample\_data\_Invest/RiversState\_Habitat”?

~ Stacie

---

<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:** [March 25, 2022, 5:22am UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/3 "2022-03-25T05:22:03Z")

</div>

In addition to what Stacie mentioned, it is also possible that the mixed forward slashes (`/`) and backslashes (`\`) are causing the model to not be able to locate the file. I would recommend switching all of the backslashes to forward slashes just in case.

---

<div class="post-metadata">

**Author:** ![Nomsy](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@Nomsy](https://community.naturalcapitalalliance.org/u/Nomsy)\
**Post date:** [March 25, 2022, 2:28pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/4 "2022-03-25T14:28:56Z")

</div>

The slashes come from the folder(s) where the datasets are saved, not sure how I can change all to forward slashes but I will give it a try.  
I will look at the mangrove.shp file again and revert. Thank you

Chinomnso C. Onwubiko  
PhD Candidate, World Bank Africa Centre of Excellence in Coastal Resilience(ACECoR)  
+2347061162130

---

<div class="post-metadata">

**Author:** ![Nomsy](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@Nomsy](https://community.naturalcapitalalliance.org/u/Nomsy)\
**Post date:** [January 31, 2023, 1:12pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/5 "2023-01-31T13:12:39Z")

</div>

Hi @swolny @jdouglass

So, I discovered I was working from different folders and mangrove shapefile wasn’t located in the said folder, but I have corrected this.

I need to add ranks to the data sets, and I can’t seem to find a way to do that.

---

<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:** [February 4, 2023, 1:13am UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/6 "2023-02-04T01:13:19Z")

</div>

@Nomsy ,

well, if you’re trying to add a rank column to your spatial dataset, then it will be easiest to edit the file in a GIS tool such as QGIS and ArcGIS, create the new column and then add values for each of your spatial features.

James

---

<div class="post-metadata">

**Author:** ![Nomsy](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@Nomsy](https://community.naturalcapitalalliance.org/u/Nomsy)\
**Post date:** [February 4, 2023, 12:25pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/7 "2023-02-04T12:25:55Z")

</div>

Thanks @jdouglass I was able to do that.

---

<div class="post-metadata">

**Author:** ![Nomsy](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@Nomsy](https://community.naturalcapitalalliance.org/u/Nomsy)\
**Post date:** [February 6, 2023, 2:32pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/8 "2023-02-06T14:32:08Z")

</div>

Hi @jdouglass

Please, I ran the coastal vulnerability model, and I got some outputs but no output for coastal exposure, am not sure why. Was hoping you could help me figure out what I didn’t do right. I attached the log file too.  
[InVEST-Coastal-Vulnerability-log-2023-02-05–21\_06\_10.txt](https://community.naturalcapitalalliance.org/uploads/short-url/7JXPpuaTcqHiGRrRMFk9npWPdMa.txt) (5.2 MB)

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [February 8, 2023, 9:49pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/9 "2023-02-08T21:49:05Z")

</div>

Closing this since the last question looks like it was moved over here: [Coastal Vulnerability model](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-model/3399)

---

<div class="post-metadata">

**Author:** ![dave](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dave/32/70_2.png) [@dave](https://community.naturalcapitalalliance.org/u/dave)\
**Post date:** [February 8, 2023, 9:49pm UTC](https://community.naturalcapitalalliance.org/t/coastal-vulnerability-error-could-not-open-habitat-datasets/2620/10 "2023-02-08T21:49:17Z")

</div>


