Skip to content

Error while creating a flow #28

Description

@y-aoub

I tried to create a new flow and add it to the database, like this. But, I have the error below even if the id and type are defined. Weird!

PET_LC.id = str(uuid.uuid4())
PET_LC.flow_type = olca.FlowType.PRODUCT_FLOW 
PET_LC.name = 'PET_LC'
PET_LC.description = 'PET Bottle Life Cycle'

#items = client.find(olca.FlowProperty, ‘Number of items’) 
items = olca.FlowProperty()
items.name = 'Number of items'

items_factor = olca.FlowPropertyFactor() 
items_factor.conversion_factor = 1.0
items_factor.flow_property = items 
items_factor.reference_flow_property = True
PET_LC.flow_properties = [items_factor]

client.insert(PET_LC)```


`-32602: Invalid params: params must be an object with valid @id and @type`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions