USEPA / ElectricityLCI

Creative Commons Zero v1.0 Universal
24 stars 10 forks source link

AttributeError: module 'olca' has no attribute 'ProcessRef' #179

Closed dt-woods closed 1 year ago

dt-woods commented 2 years ago

Received the titular error when running:

python -m electricitylci.main

The trace back is:

File "~/python3.9/site-packages/electricitylci/main.py", line 31, in main
    upstream_dict = electricitylci.write_upstream_dicts_to_jsonld(upstream_dict)
  File "~/python3.9/site-packages/electricitylci/__init__.py", line 344, in write_upstream_dicts_to_jsonld
    upstream_dicts = write_process_dicts_to_jsonld(upstream_dicts)
  File "~/python3.9/site-packages/electricitylci/__init__.py", line 276, in write_process_dicts_to_jsonld
    from electricitylci.olca_jsonld_writer import write
  File "~/python3.9/site-packages/electricitylci/olca_jsonld_writer.py", line 403, in <module>
    def _process_ref(dict_d: dict) -> Optional[olca.ProcessRef]:
AttributeError: module 'olca' has no attribute 'ProcessRef'

I looked through GreenDelta's olca-ipc package and I don't see this module anywhere either. Examining the function _process_ref in eLCI, it looks like you can get the same functionality using olca.Process, which has the same attributes that are being assigned here.

I am running Python 3.9.9 with the following installed:

bl-young commented 2 years ago

I believe there were some updates made in olca v0.0.11 that deprecated some functions or changed some attribute names. In some other packages we are limiting olca to < 0.0.10 for the time being until we get things updated.

dt-woods commented 2 years ago

Yeah. I have olca v.0.0.11. I think the issue is version 1.0.2 of fedelemflowlist is still referenced and it doesn't limit the olca version, so I keep getting the latest. Is it okay to use the latest fedelemflowlist? I'll try to manually install the older version of olca to see if that solves the problem.

dt-woods commented 2 years ago

Version 0.0.10 of olca-ipc works! Cheers!