brightway-lca / brightway2-io

Importing and exporting for the Brightway LCA framework
BSD 3-Clause "New" or "Revised" License
26 stars 41 forks source link

mixed data types in elementary flow categories in biosphere3 #85

Closed mfastudillo closed 3 years ago

mfastudillo commented 3 years ago

usually the categories of elementary flows are a tuple. but if I run [f for f in bw.Database('biosphere3') if isinstance(f['categories'],list)] in a newly created project I get 3 flows whose categories are a list. (bw2io version 7.12.1)

I am not sure why, but it would be better to have just one data type.

cmutel commented 3 years ago

It is because these flows were used in previous versions of ecoinvent, but were later no longer used, and so aren't present in the master flow list. We include them for backwards compatibility, but as a JSON file; however, JSON does not have tuples, only lists, so the categories weren't imported correctly.