InVEST 3.6.0 Habitat Quality Error

Hello learned scientists,
I do need help to resolve this tough error.
I have been working on this (Habitat Quality) ecosystem service and in the process of running the model, it got stuck at the point in which it generated an error stating that it could not convert string to float. The actual error goes thus (ValueError: could not convert string to float).
Please how do I go in resolving this. I have attached the accompanying error message to this.
Thank you for the attempt.

InVEST-Habitat-Quality-log-2019-04-20–21_33_38.txt (3.7 KB)

Hi @rsa_seun -

Thanks for posting your log file. Is it possible that one of your input tables (threats or sensitivity) contains string characters in a field that should be numbers? One thing that might cause that is using commas as decimal separators instead of periods (so, giving a value of 0,5 instead of 0.5 - the latter is what’s required.)

Another possibility is that the CSV file is actually saving with values separated by semicolons instead of commas. Check the file in a text editor to see (it won’t show up if you just look at the table in Excel) and change the output format to use commas instead and see if that helps.

~ Stacie

Hi @swolny

Thank you for your response to my request. I have patiently and carefully edit and re-edit the threats and sensitivity tables to remove any inconsistencies with data formats. The error remains. I don’t know what else to do. Please can I send the entire dataset to you via email so that you can guide me on what to do going forward.
Thank you for the time.

'Seun

Sure, 'Seun, send your inputs and I’ll look at them: swolny@stanford.edu.

~ Stacie

Hi Stacie,

Many thanks for the immense assistance. I have re-edited the tables. And, the model was completed in less than 2 seconds!

I honestly appreciate your response and kind support.

Regards.

Excellent, I’m glad to hear it. Would you please share what you did to fix the problem? Then others can benefit from your experience.

~ Stacie

Hi everybody! I have the same problem! I tried to operate on the csv tab but the error still exists.
I need to have comma values in my csv tab but i found that if i remove the comma, the model runs correctly.
How can I go on? Can I share my tab with you?

  • Pier

@Pier,
If you have commas in your table values, you need to use a different delimiter (such as semicolons) to separate the values. You can set the delimiter when you export the CSV from your spreadsheet software.