cyrillefrancois / openlca2bw

Other
9 stars 5 forks source link

ImportError: cannot import name 'EXISTING_SYMBOLS' from 'bw2parameters.utils' #6

Closed qtu-UBC closed 9 months ago

qtu-UBC commented 9 months ago

Hello, I tried to import openlca2bw but ran into this error:

Traceback (most recent call last): File "/home/qtu/openlca2bw_test/tests/greendelta_PET_bottle_ex.py", line 4, in import openlca2bw as olca2bw File "/home/qtu/openlca2bw_test/.venv/lib/python3.10/site-packages/openlca2bw/init.py", line 3, in from .utils import flattenNestedList, return_attribute, uncertainty_convert, main_flow_table, change_formula, change_param_names, is_product, ref_flow, root_folder, rescale_exchange, convert_to_internal_ids, normalize_units File "/home/qtu/openlca2bw_test/.venv/lib/python3.10/site-packages/openlca2bw/utils.py", line 10, in from bw2parameters.utils import EXISTING_SYMBOLS ImportError: cannot import name 'EXISTING_SYMBOLS' from 'bw2parameters.utils' (/home/qtu/openlca2bw_test/.venv/lib/python3.10/site-packages/bw2parameters/utils.py)

I looked into the 'bw2parameters.utils.py', but there seems no such a constant named 'EXISTING_SYMBOLS'.

I pip installed openlca2bw and it seems all the dependencies were correctly installed (e.g., the version of bw2parameters is 1.1.0

tjlca commented 9 months ago

Same issue. I think we need older version of bw2parameters

cyrillefrancois commented 9 months ago

Thank you for raising this issue, I have made a new release with multiple changes (new version OpenLCA, parameters issues) For your specific issue, I simply specify in requirement the need for bw2parameters 0.6.6. For now, it's easier to use an environment with a old version of brightway2

tjlca commented 8 months ago

pip install bw2parameters==0.6.6

worked. Issue has been resolved.