Hello, I am trying to run the model regarding habitat quality but stuck to upload the input data (lulc, sensitivity and threat rasters)

What is the issue or question you have? could not upload the lulc, sensitivity.csv and threat.csv

What do you expect to happen? upload the files to run model.

What have you tried so far? yes

Attach the logfile here:

Hello @Samjhana, and welcome to the forum!

When you say that you cannot “upload” the LULC, does this mean that you’re having trouble bringing those inputs into the Workbench application interface? Or something different?

Is Workbench showing an error? If so, please take a screenshot and post it here.

~ Stacie

Please kindly find the attached screenshot.


Thanks for the screenshot @Samjhana. If you click on the red X next to the inputs, it will give you a brief message about what’s wrong. What do these messages say?

~ Stacie

Thanks for you responses swolny, I have successfully ran the model but again found the issues as in screenshots. Please …

InVEST-natcap.invest.habitat_quality-log-2023-11-16–14_31_31.txt (2.6 KB)

Thanks for posting the log file @Samjhana. The error message says this:

ValueError: Value(s) in the “habitat” column of the table D:\Workplace2020\Sensitivity.csv could not be interpreted as ratios. Original error: could not convert string to float: ‘Grassland’

So look at Sensitivity.csv and try to figure out what’s going on. The model thinks that there is a value of ‘Grassland’ in the “habitat” column, when there should be a floating point number. Are there actually text values in the “habitat” column? If so, you’ll need to change that, as is described in the User Guide (and sample data).

If there don’t appear to be text values in the “habitat” column, then perhaps there’s a problem with the table format. Look at the CSV in a text editor, where you can see the formatting better than in Excel. Make sure all of the column values are correct, none are missing, and all are separated by commas.

If you still can’t find the source of the error, please post the Sensitivity.csv table and we’ll take a look.

~ Stacie

Please find this.

Sensitivity1.csv (1.19 KB)

Hi @Samjhana , thank you for sharing your data table. Please note the difference in the table headers between your table:

And the properly formatted table from this model’s sample data:

I expect that is the source of the problem.

1 Like

Thank you dave, for your response. I have done as your suggestion, but another issue was created. Now model has shown error in threat.csv, which was not shown in previously. Please…

Hi @Samjhana -

Have you verified that the Threat.csv table has the format required by the model? And that the cur_path entries are valid file paths, relative to the location of the Threat.csv table?

~ Stacie

Thank you @ swolny, I have successfully run the model and got results in the folder "intermediate’ as a “habitat_c.tif” along with other 50 .tif. The habitat_c.tif is very closely similar the habtiat suitability of sensitivity table. I did not find any changes in habitats which are nearer and far from the threats. please …

Hi @Samjhana -

If the model ran successfully, the main outputs of the model (habitat quality and degradation) will be in the “output” folder, as described in the User Guide.

If the model didn’t finish successfully, please post the entire log file (.txt) that’s created in the Workspace so we can try to find the problem.

~ Stacie

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