Hi everyone, I’m getting this error: `elasticsear...
# ask-the-community
e
Hi everyone, I’m getting this error:
elasticsearch.NotFoundError: NotFoundError(404, "{'_index': 'enabled_entities', '_id': 'Promise(node:.entity_id)', 'found': False}")
But I want to undersntand the Promise thing.In this scenario, entity_id in a parameter and not a result from a task, simplified, this is the workflow/class interaction:
Copy code
def some_workflow(entity_id: int):
    instanse = SomeClass(entity_id=entity_id)
    
    
class SomeClass:
    def __init__(self, entity_id: int):
        lb = AnotherClass()
        lb.process(entity_id)
The error above, happens on lb.process that basically calls to elastic to get some data. Why flyte is passing the parameter as Promise?
s
How are you using
SomeClass
in your Flyte pipeline?
e
Copy code
@workflow
def some_workflow(entity_id: int):
    instanse = SomeClass(entity_id=entity_id)
    anotherTass()

    
    
class SomeClass:
    def __init__(self, entity_id: int):
        lb = AnotherClass()
        lb.process(entity_id) #fails here
@Samhita Alla like this
s
I don't think this will work 'cause you cannot create an instance of a class in a workflow. Can you call a task and encapsulate the instance creation within a Flyte task?