HRA model: The following stressor-habitat pair(s) do not have at least one exposure rating:

I’m trying to run an HRA model with some random number I put into the CSV files, but I keep receiving this error:

The following stressor-habitat pair(s) do not have at least one exposure rating: [(‘RCF’, ‘Roads’), (‘RCF’, ‘MIN’), (‘RCF’, ‘OPL’), (‘RCF’, ‘SET’), (‘RCF’, ‘DCL’), (‘RCF’, ‘BRL’), (‘UDM’, ‘Roads’), (‘UDM’, ‘MIN’), (‘UDM’, ‘OPL’), (‘UDM’, ‘SET’), (‘UDM’, ‘DCL’), (‘UDM’, ‘BRL’), (‘DIM’, ‘Roads’), (‘DIM’, ‘MIN’), (‘DIM’, ‘OPL’), (‘DIM’, ‘SET’), (‘DIM’, ‘DCL’), (‘DIM’, ‘BRL’), (‘WAB’, ‘Roads’), (‘WAB’, ‘MIN’), (‘WAB’, ‘OPL’), (‘WAB’, ‘SET’), (‘WAB’, ‘DCL’), (‘WAB’, ‘BRL’)]

Here’s my data. Can anyone tell me what is wrong with it because I can’t seem to find anything? Criteria scores.csv (9.8 KB)

Here’s my log:
InVEST-Habitat-Risk-Assessment-log-2021-09-20–20_15_48.txt (7.2 KB)

Hi @kurapika , thanks for posting. I happened to be debugging something else in this model the last couple days, so I will take a look at this problem as well. It could help to have your “Habitat Stressor Information” CSV. Could you upload that also please?

Thanks,

1 Like

Hi Dave,

Thanks for your help. Here’s my Habitat Stressor Info too as requested.

Habitat and stressor information .csv (2.0 KB)

Thanks for that table. It looks like there is one habitat missing from the “info” table that is present in the “criteria” table: “RPL”. You can decide if that habitat should appear in both tables, or in neither. And we should update the model’s validation to give a more informative error message about that.

After resolving that, I expect you will encounter a very similar error that states: The following stressor-habitat pair(s) do not have at least one **consequence** rating:

I noticed that all the criteria are labelled “E” for exposure. At least one in each habitat-stressor pair will need to be a “C” consequence criteria. There is some guidance for these criteria in the User’s Guide. Habitat Risk Assessment — InVEST documentation

Good luck,

Thank you so much for the insight! I’ll check it out and fix it as appropriate. The reason I included “Es” for all criteria is that I just wanted to test the output before going ahead with the actual correct criteria.

Thanks again!

1 Like

Hi Dave,

Your solution worked just fine. However, I encountered another problem that I cannot understand. Is there something wrong with one of my shapefiles?

AttributeError: ‘NoneType’ object has no attribute 'SimplifyPreserveTopology

You may find the data log here:
InVEST-Habitat-Risk-Assessment-log-2021-09-21–09_37_41.txt (11.3 KB)

Thank you for all your help

Once I removed my roads shapefile, the model finally worked. So there has to be a problem with this shapefile, although I can’t figure out what I may be.

Hi @kurapika , great to hear you are making progress.

AttributeError: ‘NoneType’ object has no attribute 'SimplifyPreserveTopology

My guess is that this error indicates a feature in the Roads shapefile that has no actual geometry. You can probably find & delete that feature (or add some geometry to it) in GIS with a conditional selection expression; something like “geometry is NULL”. It will vary depending on what GIS software you are using.

That makes sense. Thank you for all your help!

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