Problems in the biophysical table of the flood risk mitigation model

Dear colleagues at Natural Capital
I applied the flood risk mitigation model for the municipality of Recife (Brazil), but I had a problem in my biophysical table
The following error:
07/05/2023 14:42:56 natcap.invest.utils ERROR Exception while executing natcap.invest.urban_flood_risk_mitigation
Traceback (most recent call last):
File “scipy\sparse_base.py”, line 376, in asformat
File “scipy\sparse_coo.py”, line 403, in tocsr
File “scipy\sparse_sputils.py”, line 53, in upcast
TypeError: no supported conversion for types: (dtype(‘<U32’),)
map caio.csv (481 Bytes)

Hi @Caio, and welcome!

Someone else posted about this same error recently. Please check out this post and see if it helps. If not, let us know.

~ Stacie

1 Like

Hi @Caio,

I think Stacie has it right in pointing you to that other post. It looks like the CSV table you attached has empty values for the CN_ columns for the first two lucode rows. Filling in those values should do the trick.

We’ll do some better validation and/or error messaging in a future version of InVEST. Thanks for reporting!

Thanks,

Doug

1 Like

Good afternoon community, due to the weather, I was only able to take the test today! I tried to fill in the values, unfortunately the error remained, could you help me in correcting the biophysical table? Anyway, I’m very grateful to all of you in the community for your help!
map caio.csv (488 Bytes)

Hi @Caio -

One thing I see is that the values in this table are separated by semicolons, not commas, as required by the model. Please try saving the table using commas as separators and see if that helps.

~ Stacie

1 Like

Thanks for the reply and help! But unfortunately the problem remained, I tried to make the corrections mentioned by you, but the problem was not solved!

@Caio, are you getting the same error that you originally posted? Can you post your latest CSV so we can check it out?

~ Stacie

1 Like

Good afternoon Invest community, I greatly appreciate your help. A big hug!
map caio.csv (485 Bytes)

Hi @Caio,

Would you mind attaching the latest logfile here? It’ll help us have better context for the error message. The logfile is saved in the Workspace directory for the model.

Thanks!

Doug

1 Like

Good evening, I’m sending you, and huge gratitude for your help with Brazilian researchers!
InVEST-natcap.invest.urban_flood_risk_mitigation-log-2023-07-12–14_05_50.txt (5.3 KB)
InVEST-natcap.invest.urban_flood_risk_mitigation-log-2023-07-12–14_05_50.txt (5.3 KB)

Thanks @Caio,

It looks like the landcover raster might have values that are not in the curve number table new_mapbiomas-brazil-collection-70-recifepe-area.csv.

ValueError: The biophysical table is missing a row for lucode(s) [15, 20, 21, 24, 33]

Could you check that you expect the values [15, 20, 21, 24, 33] to be in your landcover raster, and then that they are represented in the table?

Cheers,

Doug

Good afternoon Natural Capital community, Unfortunately the csv problem persists and I am not able to solve it, I spent this period trying and I could not. Well, I wanted to know if you are available to meet with us, and what would be the best channel for that?
If not, could I send my data by email, for you to look at?

Hi @Caio -

If you provide your whole datastack, I’ll take a look at it. This post has instructions for how to provide data in a way that makes it easy for us to replicate what you’re doing, so easier to troubleshoot. Please follow the instructions and send me a link to the resulting datastack. You can either post the link here or send it to swolny@stanford.edu.

~ Stacie

1 Like

InVest community, thanks to your help, I was able to develop the results in the software. Sorry for the delay in response time, I’m graduating and it’s a big rush. A hug and a huge thank you for your help!

1 Like

Glad you were able to get the model running, and congratulations on your graduation @Caio!

~ Stacie

1 Like

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