activity-browser icon indicating copy to clipboard operation
activity-browser copied to clipboard

Failed import of BW database

Open GiacomoEV opened this issue 3 years ago • 3 comments

I get the attached error when importing a specific local Brightway database.

AB_import_error

It is unexpected because it's exported from the AB of a colleague and he has no issue re-importing it. The interesting thing is that, if I close and reopen the AB after the error occurs, I do see the new database with all correct activities and flows. However, when I want to calculate the LCA and drag a couple of activities to the LCA Setup, it produces only empty rows (second image), with the console giving the following error: Could not load key in Calculation Setup: ('specific_databse', 'f1970168c20368b62acc8f2b0bb87a38_copy6')

AB_import_error_2

Here you find the modules loaded in my AB environment: AB_environment.txt

Thank you in advance for your assistance!

GiacomoEV avatar Oct 10 '22 16:10 GiacomoEV

As the error says, one (or several) of your datasets has a float instead of a list in the classifications field.

romainsacchi avatar Oct 11 '22 14:10 romainsacchi

I am encountering the same issue. However, the error

Could not load key in Calculation Setup: ('HTEL_final_FL', 'e0f227d53b0c35828aa96d0e0511322b_copy3')

also arises with databases that I exported some minutes ago and wanted to transfer them afterwards into a different project. Furthermore after importing the database it is not shown. after restarting the activity-browser it then is shown, but cannot be used (as described by @GiacomoEV).

Is there already a solution to this issue?

th-scntst avatar Oct 14 '22 13:10 th-scntst

At the end my problem was solved by changing few values manually from the dataset that were stored as numpy NaN, instead of generic floats. And this was done by exporting it as an excel first and modifying it there. But I don't understand how did those numpy NaN end up in the dataset since it was exported through the activity-browser itself

GiacomoEV avatar Oct 24 '22 09:10 GiacomoEV

Closing as resolved in #1011

marc-vdm avatar Sep 22 '23 13:09 marc-vdm