# The habitat quality model IndexError

**URL:** <https://community.naturalcapitalalliance.org/t/the-habitat-quality-model-indexerror/1086>\
**Category:** Software Support\
**Tags:** habitat-quality\
**Created:** [June 22, 2020, 9:48am UTC](https://community.naturalcapitalalliance.org/t/the-habitat-quality-model-indexerror/1086 "2020-06-22T09:48:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gis4sd](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/gis4sd/32/881_2.png) [@gis4sd](https://community.naturalcapitalalliance.org/u/gis4sd)\
**Post date:** [June 22, 2020, 9:48am UTC](https://community.naturalcapitalalliance.org/t/the-habitat-quality-model-indexerror/1086/1 "2020-06-22T09:48:51Z")

</div>

Dear  
I run habitat quality model and got the error:  
IndexError: index 36 is out of bounds for axis 0 with size 36

I guess the reason is my data is to big, but Im not sure. I dont know what is the limit of the model (number of collums x n of rows). Could you please help me.  
I attached my data with detail logs.  
Thank you  
[habitatQuality test.zip](https://community.naturalcapitalalliance.org/uploads/short-url/iy2KJoOPV7Kuj8KPqquRFg5qCo8.zip) (2.5 MB)

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/naturalcapitalproject/original/1X/4c1fde82472f8bd65f3e181d245f84bdf7578ea1.png)

---

<div class="post-metadata">

**Author:** ![dcdenu4](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/dcdenu4/32/544_2.png) [@dcdenu4](https://community.naturalcapitalalliance.org/u/dcdenu4)\
**Post date:** [June 22, 2020, 1:23pm UTC](https://community.naturalcapitalalliance.org/t/the-habitat-quality-model-indexerror/1086/2 "2020-06-22T13:23:09Z")

</div>

Hi @gis4sd,

It looks like the landcover raster `LU151.tif` does not have a defined `nodata` value, which appears to be `128`. Thus when the model attempts to map sensitivity values to the landcover codes it is assuming that `128` is a value that should also be mapped with a sensitivity value. Since there is no corresponding row in `Sentivity_2.csv` for `128` it is failing with a not very helpful message.

SO, could you define the `nodata` value in your landcover raster to be `128` and try re-running the model?

Thanks,

Doug

---

<div class="post-metadata">

**Author:** ![gis4sd](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.naturalcapitalalliance.org/gis4sd/32/881_2.png) [@gis4sd](https://community.naturalcapitalalliance.org/u/gis4sd)\
**Post date:** [June 23, 2020, 3:16am UTC](https://community.naturalcapitalalliance.org/t/the-habitat-quality-model-indexerror/1086/3 "2020-06-23T03:16:40Z")

</div>

Hi Doug  
The model run after I define the `nodata` value to `128` as your advise.  
Thank you very much,  
Ngo Dang T

---

<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:** [June 30, 2020, 3:16am UTC](https://community.naturalcapitalalliance.org/t/the-habitat-quality-model-indexerror/1086/4 "2020-06-30T03:16:50Z")

</div>

Closed on June 30, 2020, 3:16am UTC

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