HQ Model - Error - No Match Columns Across Tables

habitat-quality
#1

Hello, my name is Nadia and I am facing issues with the InVEST habitat quality model. A little about the project that I am working on with Dr. Mushet at the Northern Prairie Wildlife Research center, I am quantifying ecosystem services in Stutsman county, North Dakota. I am looking at land use and learning how certain activities can eliminate lands we want to protect.

So far I have created my threat layers, land cover, sensitivity and threat table for a scenario looking at amphibian habitat quality in the county. I have all required layers and tables, then yesterday I have tried to run a habitat quality model however I faced many problems. I have worked around some, such as the first error I got stating that the LULC in my sensitivity file found not be found and there was not value for line 7 and 8. There were values and all of my LULC codes were correct. I am not sure how I did it though I am no longer receiving the error and facing another one. there were some other errors too that aren’t showing up anymore only the one below that I am stumped on.

The topic I created now for the question I have is that some of my columns aren’t being match across my tables. It says, "ValueError encountered: threat does not match any column in the sensitivity table. Possible columns: set([‘Unamed: 7’, ‘Unnamed:8’, ‘lake’, ‘crop’, ‘iso’, ‘hydro’]). However I am not sure why I am getting this error, the threats that I have on my threat table match exactly with the threats in the sensitivity table. All the titles are the same though I have not been able to get past this issue. What can I do?

I have attached the log file (previous errors log files as well) and a screenshot of the error along with my tables…

Thank you very much!

hqmodel%20error
<a class=“attachment”
InVEST-Habitat-Quality-log-2019-04-23–07_53_37.txt (1.7 KB)
<a class=“attachment”

#2

Oops! It only allowed me to attach two links. Here are a few more log files from the previous errors I was getting.

InVEST-Habitat-Quality-log-2019-04-22–11_37_12.txt (1.7 KB)
InVEST-Habitat-Quality-log-2019-04-22–13_28_03.txt (1.9 KB)

#3

Here are the tables I created.

Amphibian_Threat.csv (118 Bytes)
Amphibian_Sensitivity.csv (2.6 KB)

#4

Hi Nadia -

Thanks for posting the log file and tables. I see a few things that might affect different types of errors. First, look at the InVEST User Guide Data Needs section for Habitat Quality - it describes how column names must be defined in the Sensitivity Table - they must begin with “L_” plus the name of the threat, for example, a threat of “crop” would have column name “L_crop” in the Sensitivity table.

Also, looking at these CSV files in a text editor, I see extra rows at the bottom that are either just a blank line or commas without values. I’m not sure if InVEST still has a problem with this (it used to, might still), so try removing those blank lines at the bottom. You won’t see them in Excel, so use a text editor.

~ Stacie

#5

Hello @swolny , thank you for your reply! We originally had those labels for the threats in the sensitivity table however we got an error that the threats weren’t being identified on the table and tried to run the model again by editing the labels to not have the “L_.”

However I have just tired it again with the “L_” on the threats in the sensitivity table and I edited all of the extra commas and empty lines on notepad and it has successfully gotten past that error message! I think when I used this table from our previous years work onto another excel sheet it must have added a column and I wasn’t able to view it and identify the problem.

The model run has another error though it is just a missing value that I will fix now and try again. Thank you very much for your assistance and time!