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

bw2io exporter to excel doesn't find the correct reference product name #69

Closed
KarinTreyer opened this issue Jun 18, 2020 · 1 comment · Fixed by #76
Closed

bw2io exporter to excel doesn't find the correct reference product name #69

KarinTreyer opened this issue Jun 18, 2020 · 1 comment · Fixed by #76

Comments

@KarinTreyer
Copy link

When exporting LCI with the bw2io exporter, the result in excel doesn't have the correct reference product, which leads to issues in the matrix calculation.
Example in the screenshot. A) is the original import of the LCI to BW2, and B) is the resulting LCI exported from BW2 with the reference product name which is the activity name instead of the correct reference product name.
image
image

@BenPortner
Copy link
Member

This can be fixed by a change in bw2io/strategies/generic.py function assign_only_product_as_production line 90:

current version:

ds['reference product'] = product['name']

new version:

ds['reference product'] = product.get('reference product',[]) or product['name']

However, I cannot push this right now because I am not sure that it will not break anything. When running pytest on bw2io I get 6 errors, which I need to look into first.

@BenPortner BenPortner mentioned this issue Jul 1, 2020
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

Successfully merging a pull request may close this issue.

2 participants