Closed tpsarblaster closed 8 months ago
Hi @tpsarblaster , yes, this is probably because your biosphere database was generated by an older version of bw2io
(e.g., 0.8.8
). Not a premise
issue as far as I can tell, since the unit proposed is correct for bw2io 0.8.10
-- but I agree that it is annoying.
@tpsarblaster do you confirm that your biosphere3
database was generate by bw2io 0.8.10
?
As a temporary fix, I added the UUID for the flow with the Sm3 unit.
@romainsacchi Yes. Before even installing premise
to the environment I was using in this case, the biosphere3
database had been updated using bw2io 0.8.10
.
@tpsarblaster OK, that would mean bw2io
converts some units when creating a new biosphere3
database but not when updating an existing one.
This is the list of unit conversions operated by bw2io 0.8.10
upon database creation: https://github.com/brightway-lca/brightway2-io/blob/main/bw2io/units.py
In any case, it should be fixed now in the next release, thanks.
I encountered an error when executing
write_superstructure_db_to_brightway()
(console log included below). This is when using today's release of premise1.8.0
(this commit), installed in a new environment and making sure that the biosphere3 database is updated (bw2io0.8.10
, with ecoinvent3.9.1
).Investigating the file
.../premise/data/utils/export/flows_biosphere_39.csv
used to createbio_dict
, there is indeed no flow matching('Gas, natural', 'natural resource', 'in ground', 'Sm3')
, since this flow is in the .csv file with the unitstandard cubic meter
instead ofSm3
. Changing the flows in the .csv file which have thestandard cubic meter
unit toSm3
appears to fix the issue.