Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError when executing bw2setup() #277

Open
mfastudillo opened this issue Sep 20, 2024 · 3 comments
Open

ValueError when executing bw2setup() #277

mfastudillo opened this issue Sep 20, 2024 · 3 comments

Comments

@mfastudillo
Copy link
Contributor

I am testing bw2io 0.9.DEV38 and if I try to run bw2setup in a new project I get a ValueError

Can't understand elementary flow identifier ['biosphere3', '9990b51b-7023-4700-bca0-1a32ef921f74']

I am using bw2data version (4, 0, 'dev55')

@tngTUDOR

@mfastudillo
Copy link
Contributor Author

the error is raised here

I am not sure why the code seems to expect a tuple... if I read the source of the methods the pair (database,code) is a list, not a tuple 🤔


lcia_path = (Path.cwd()/'bw2io'/'data'/'lcia'/"lcia_39_ecoinvent.zip")

with zipfile.ZipFile(lcia_path, mode="r") as archive:
            data = json.load(archive.open("data.json"))

for method in data:
    method["name"] = tuple(method["name"])

for d in data:
    for e in d['exchanges']:

        assert isinstance(e['input'],list)

@cmutel
Copy link
Member

cmutel commented Sep 20, 2024

bw2setup is deprecated: https://docs.brightway.dev/en/latest/content/cheatsheet/projects.html#creating-initial-project-data. You should either start from one of the reference projects or, if using an existing project, use ecoinvent_interface to install the biosphere data and LCIA implementations you want.

@mfastudillo
Copy link
Contributor Author

ah ok, I wasn't aware of that... and if we add a warning about the method being deprecated ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants