LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
147 stars 57 forks source link

Import of database Ecoinvent 3.9 cutoff fails #866

Closed MarcoRudolf closed 1 year ago

MarcoRudolf commented 2 years ago

Hey everyone,

Ecoinvent just released its new Database version 3.9. By trying to import the Database in my Project, the import fails and the following error is shown: "The import failed as required biosphere exchanges are missing from the biosphere3 database. Please update the biosphere by using 'File' -> 'Update biosphere...'" I updated the bioshpere3 database in my project, but the error still occurs. Anyone have an idea? (I work on a mac) Bildschirmfoto 2022-10-18 um 10 46 55

Cheers, Marco

Zoophobus commented 2 years ago

Hi Marc,

there is an issue with the latest release from ecoinvent. Here's the message from CMutel on the topic. Please send a message if this doesn't help to solve your problem!

Ecoinvent version 3.9 (system models consequential, cutoff, and EN15804; APOS will come later) were released today. New releases of Brightway bring compatibility for this new data.

Upgrading libraries

Upgrading: You should upgrade either the package brightway2 or brightway25 (or brightway2_nosolver or brightway25_nosolver if you are an ARM machine). Manually upgrading libraries like bw2io will probably break things. How exactly this will work depends on how you have your channels configured, but will be something like:

conda update brightway2

Upgrading projects There are substantial changes in version 3.9 - more than 300 new elementary flows, 31 elementary flows were deprecated and deleted, and the LCIA methods were completely redone. The inventory data was added to, but some sectors were changed a lot. Therefore, for now our recommendation is to start using 3.9 in new projects; we are developing a generic toolkit to do updates of inventory databases, but this will take some time.

Fixing errors I have tested the import and calculation steps on brightway2 and brightway25, but I could easily have missed something. Please file errors at https://github.com/brightway-lca/brightway2-io/issues and tag me (@cmutel). Responding to this email will spam 150 people, let's not do that.

marc-vdm commented 2 years ago

@Zoophobus, we also need to update AB to be able to update biosphere, see #840

marc-vdm commented 2 years ago

Also @MarcoRudolf (and @Zoophobus), I'd personally recommend updating AB to avoid any other dependency issues too. Just do:

conda update activity-browser or conda update activity-browser-dev

This may be safer than only updating brightway2

romainsacchi commented 2 years ago

To use ei39, I believe you need to use bw2io 0.8.8. But for ei38 or prior, that's bw2io 0.8.6. But @cmutel can maybe confirm.

MarcoRudolf commented 2 years ago

Hey everyone, thanks for the quick support! I updated brightway2 as well as the ab (I use the standard version). Then I updated the biosphere3 database via the ab. Unfortunately, the same error still occurs.

@romainsacchi , can it be that I have to manually switch to bw2io 0.8.8 ? How do I know which Version of the biosphere is being used?

romainsacchi commented 2 years ago

I would indeed try to upgrade to bw2io 0.8.8 if you intend to use ei39. And then, update the biosphere.

cmutel commented 2 years ago

Be careful here, 0.8.8 supports only ecoinvent 3.9, not earlier versions. I can fix this later but am indisposed for the next few days.

iamz33 commented 1 year ago

Hi. Any update on this? Waiting to work with ecoivnent 3.9 using AB. Please let us know when it gets resolved. Tnx

Zoophobus commented 1 year ago

Hi all,

if anyone is still waiting to work with Ecoinvent 3.9 in the AB then there are the current recommended bw2io versions that will be required (0.8.8 for later versions). The problem remains, though, that you will need to maintain separate environments for the latest and older versions of Ecoinvent

cprato-qw commented 11 months ago

Hello

i have the following configuration image

but i'm still having troubbles importing Ecoinvent 3.9 via Activity Browser (same error as descripted in OP)

This is my brightway version: image

image

I tried with different version of bw2io but still getting errors. image

image

Any idea?

marc-vdm commented 11 months ago

Hi there! Thanks for reaching out.

I see your AB version is a bit old. I would suggest trying to update and then trying again. As you have an older version, you need to go through a few special steps to update. You can see the guide here.

Let me know if that fixes your problem or if you need more help!

cprato-qw commented 11 months ago

thank you marc, this solved it!

KanMengqing commented 3 months ago

Hi, I'm still experiencing the same problem. I want to import ecoinvent 3.8 but I got the same warning message that "The import failed as required biosphere exchanges are missing.." Here are the versions of my bw2. How should I fix the problem? Thanks!!

Screenshot 2024-07-11 at 1 04 04 PM
marc-vdm commented 3 months ago

Hi @KanMengqing

Are you trying this on Activity Browser or on Brightway? These are two different things. Activity Browser has different tools for this than Brightway.