Closed SidiPeng closed 1 year ago
Hi @SidiPeng,
let's look first at the case using ei 3.9.
Can you confirm that the version of bw2io
is 0.8.8
?
If not, update to bw2io==0.8.8
and update your biosphere database in your project.
Then, try again.
Thanks for your quick response! I run the following code: del bw2data.databases['biosphere3'] bw.bw2setup() New errors came:
Now, bw2io==0.8.8, premise==1.5.7, bw2data==3.6.6.
OK, then try:
create_default_lcia_methods(overwrite=True)
But in any case, while recreating the LCIA methods failed without overwrite=True
, create_default_biosphere
passed, so you may retry the creation of premise database see if you get the same error.
But in any case, while recreating the LCIA methods failed without
overwrite=True
,create_default_biosphere
passed, so you may retry the creation of premise database see if you get the same error.
Hi Romain. Thanks a lot for the reply. It worked for ecoinvent v3.9.1 successfully, but the same error arose as above for v3.7.1, unfortunately.
Hi @SidiPeng ,
yes, it's an issue due to the incompatibility between the biospheres installed by bw2io 0.8.7
(which only works for ecoinvent up to and including 3.8) and bw2io 0.8.8
(which only works with ecoinvent 3.9) which hopefully may be resolved soon.
Hey, I was using "write_db_to_brightway" from premise v.1.5.7. When I worked with ecoinvent v3.8, it worked perfectly, but errors occurred when I worked with ecoinvent v3.7.1 and v3.9.1. I am not an urgent user of v3.7.1 and v3.9.1, and I am just curious why these errors occur. :)
Here are my codes and errors :
bw2data.projects.set_current("premise") bw2data.databases clear_cache() bw.bw2setup()
ndb37 = NewDatabase( scenarios=[ {"model":"image", "pathway":"SSP2-RCP19", "year":2050}, ], source_db="ecoinvent 3.7.1_cutoff_ecoSpold02", source_version="3.7", key='......................' ) ndb39.update_all() ndb37.write_db_to_brightway(name=["ecoinvent 3.7.1_cutoff_ecoSpold02 image SSP2-RCP19 2050"])![error-3 7 1](https://github.com/polca/premise/assets/70491287/05552ca9-4800-430a-8a77-5071a381bec9)
ndb39 = NewDatabase( scenarios=[ {"model":"image", "pathway":"SSP2-RCP19", "year":2050}, ], source_type="ecospold", source_file_path=r"../database/ecoinvent 3.9.1_cutoff_ecoSpold02/datasets", source_version="3.9", key='......................' ) ndb39.update_all() ndb39.write_db_to_brightway(name=["ecoinvent 3.9.1_cutoff_ecoSpold02 image SSP2-RCP19 2050"])
![error-3 9 1 (2)](https://github.com/polca/premise/assets/70491287/770b2cf7-d275-40fc-99f3-0089d9b1d7e9)