HRA Value Error: Criteria table missing values

Hello everyone!

When running InVEST Habitat Risk Assessment (3.7.0 x 86 version) I am having problems with the criteria table. The last errors reported are:

  • The Criteria table is missing the following value(s) in the first: ‘HABITAT NAME’, ‘HABITAT STRESSOR OVERLAP PROPERTIES’, ‘HABITAT RESILIENCE ATTRIBUTES’.

In previous running attempts also appeared:

ParserError: Error tokenizing data;ValueError: The Criteria table is missing the column header “CRITERIA TYPE”.

I already have carefully checked all shapefiles (namely the coordinate system) and all CSV files. I have turned my computer settings into international ones (so that commas are used and not semicolons).

The errors presented change as I try to introduce different formats for the table (.csv and .xls files). I can only run HRA with data coming with the model itself (.csv and with all the information in one column and separated by commas). With my own data the model just does not run.

It would be very kind of you if someone manage to give me some support.

Thanks a lot!

Maria

Hi @MariaB,

Sorry to hear you’re having trouble with HRA. Do you think you could attach the latest log file that is generated when running the model? It should be text file in your workspace directory. Along with that, if you could attach or share your inputs that would allow us to debug this much quicker on our end.

Best,

Doug

1 Like

Hello Doug1
Thanks for your willingness to help me.
Herebelow I attach the log file and the two CSV files.
Thanks again.

InVEST-Habitat-Risk-Assessment-log-2020-06-29–12_04_31.txt (2.0 KB) exposure_consequence_criteria.csv (7.5 KB)

habitat_stressor_info.csv (2.1 KB)

Hi @MariaB,

When I opened the CSV files in a text editor (notepad++ or notepad), it appeared that each row was wrapped in quotation marks. I removed the quotation marks and am attaching those versions here. Could you try using these to see if it fixes the issue?

exposure_consequence_criteria_no_quotes.csv (7.3 KB)
habitat_stressor_info_no_quotes.csv (2.0 KB)

Best,

Doug

1 Like

Hi Doug!
Thank you for your help.
I run the model with the new csv files you send me.
It run a little longer but, unfortunately, reported another error. This time a different one:
“AttributeError encountered: ‘NoneType’ object has no attribute ‘SimplifyPreserveTopology’”.
This error is a new one, though. I has never before appeared to me.
I attach the new log file.InVEST-Habitat-Risk-Assessment-log-2020-07-03–08_48_28.txt (8.6 KB)
Thanks a lot.
MariaB

Hi again Doug!
Just to inform you that, finally, I have solved all the problems. The model successfully run.
Thank you for your help (which really helped me).
Cheers
MariaB

Hi @MariaB,

So glad you were able to get it working. Could you post what the problem and fix was the second error: “AttributeError encountered: ‘NoneType’ object has no attribute ‘SimplifyPreserveTopology’”. This could be really helpful to users of this model in the future.

Thanks!

Doug