Errors for coastal blue carbon

Dear Natural Capital Project,

I’m trying to monitoring the ecosystem service with CBC model, when I run it, the result show "ValueError encountered: DataFrame index must be unique for orien = ‘index’. I have no idea how to slove this problem, is there any way to solve this problem could be share? or any trainning videos? it would be very helpful for that. Thanks a lot.

Best regard,
Suzhen

Hello @suzhen ,

Could you provide the logfile from the run where you encountered this error? That will help us identify exactly where the error is occurring.

Thanks,
James

Thank you for your kindly reply, and here is the logfile that I used the sample data to run the Coastal Blue Carbon, it showed "ValueError encountered: DataFrame index must be unique for orient = ‘index’.
I am confused about that because I used the sample data… InVEST-Coastal-Blue-Carbon-log-2023-01-11–21_49_08.txt (3.9 KB)

HI @suzhen -

Thanks for posting your log file. The first ERROR is actually this:

ERROR The 'key_field' : 'lulc-class' column values are not unique: ['unnamed1', 'developed dry land', 'undeveloped dry land', 'nontidal swamp', 'cypress swamp', 'inland fresh marsh', 'tidal fresh marsh', 'transitional salt marsh', 'regularly flooded marsh', 'mangrove', 'estuarine beach', 'tidal flat', 'ocean beach', 'unnamed2', 'rocky intertidal', 'inland open water', 'riverine tidal open water', 'estuarine water', 'unnamed3', 'open ocean', 'irregularly flooded marsh', 'unnamed4', 'inland shore', 'tidal swamp', nan, nan, nan, nan, nan]

There are also 3 WARNINGS:

WARNING Empty or NaN values were found in the table: E:/InVEST/InVEST_3.8.8_x86/try/outputs_preprocessor/carbon_pool_initial_template.csv.

These indicate to me that you probably have 5 columns in your CSV table that are blank, they do not have field names (so the error above is showing them as “nan”) or values. It can be hard to find these problems if you’re editing in a spreadsheet program like Excel, but if you edit the CSV in a text editor, you can more easily see the missing data. Try removing these 5 columns with no data and see if it helps.

Also, you’re using a fairly old version of InVEST, it would be good to use the latest version, which is 3.12.0.

~ Stacie

1 Like

To Stacie’s point about the InVEST version, the Coastal Blue Carbon model got a big update in the InVEST 3.9.0 release. It looks like you’re using 3.8.8. We would highly recommend you update to the latest version of InVEST to take advantage of the improvements and bug fixes.

Cheers,

~ Doug

Many thanks for your kindly reply, it really help. But new proplems exist, and here is the log file, could you help? many thanks again
InVEST-Coastal-Blue-Carbon-log-2023-01-13–23_24_40.txt (3.0 KB)

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