+1 vote
214 views

Hello,

When I try to get id for a Product System using ffiind() function, I get a correct answer :

Entrée[123]:
ps = client.find(olca.ProductSystem, name="Common waste")
ps
Out[123]:
{
  "@id": "49d8e929-b61b-4dbe-8a36-43e71735c5ea",
  "@type": "ProductSystem",
  "name": "Common waste"
}

But when I try to get attributes (like unit, target amount, etc ..) for a Product System using get_descriptor() function, I get this error :

Entrée[127]:
system_ref = client.get_descriptor(
    olca.ProductSystem,
    '49d8e929-b61b-4dbe-8a36-43e71735c5ea')
system_ref
print(system_ref.to_json())

Out[127]:
ERROR:root:failed to get descriptor: -32601: Does not understand: get/descriptor 

I tried using the example of documentation and it's the same issue ..

Does anyone could help me please ?

version:openLCA 1.11.0

in openLCA by (130 points)
edited by
by (5.2k points)
I think that's what get_descriptor is supposed to do - give you only the information you need to identify the product system not the full product system object. For my uses, get_descriptors is handy for generating lists of product systems that I can use for iteration - much faster than pulling ProductSystem objects.

Please log in or register to answer this question.

...