+1 vote
321 views

Hii,i am trying to do an LCA using the OLCA api and i have been successful in creating a process out of the flows which are inputted to OLCA via API and parsed through an excel sheet.The mapping is done by specifying UUIDs and flow data in the excel sheet as shown in the following video.

https://www.youtube.com/watch?v=-HaQc1qTa7E&ab_channel=openLCA

But i have no function to choose the provider, if some flow in my flow inputs have more than one providers. Resultantly, the moment i create a product system out of the created process, OLCA just connects the flow to a "default" provider, which is actually the first provider in the dropdown choices of providers. I use the following code for this

product_system = client.create_product_system(search_list[i], default_providers='prefer', preferred_type='UNIT_PROCESS')

Can someone please give me a hint how do i choose a certain provider for my electricity flow via the API?

If i am using the get_providers_of function from the client as follows, i am getting an error saying"failed to get providers: -32601: Does not understand: get/providers" 

Can someone help me solve this issue?

electricity = client.get('Flow', '890a70b7-b677-4e2a-8a1b-7d017e0a10ae')
#print(steel)
for provider in client.get_providers_of(electricity):
     print(provider.name)

Thanks in Advance!

in openLCA by (130 points)
edited by
by (410 points)
Also looking for this answer.

Please log in or register to answer this question.

...