conductor-python
conductor-python copied to clipboard
TypeError: 'type' object is not subscriptable
Hello everyone, I get this error while importing the Worker
class:
from conductor.client.worker.worker import Worker
../../.local/lib/python3.8/site-packages/conductor/client/worker/worker.py:14: in <module>
from conductor.client.http.api_client import ApiClient
../../.local/lib/python3.8/site-packages/conductor/client/http/api_client.py:15: in <module>
import conductor.client.http.models as http_models
../../.local/lib/python3.8/site-packages/conductor/client/http/models/__init__.py:34: in <module>
from conductor.client.http.models.workflow_task import WorkflowTask
../../.local/lib/python3.8/site-packages/conductor/client/http/models/workflow_task.py:7: in <module>
from conductor.client.http.models.state_change_event import StateChangeConfig, StateChangeEventType, StateChangeEvent
../../.local/lib/python3.8/site-packages/conductor/client/http/models/state_change_event.py:14: in <module>
class StateChangeEvent:
../../.local/lib/python3.8/site-packages/conductor/client/http/models/state_change_event.py:25: in StateChangeEvent
def __init__(self, type: str, payload: dict[str, object]) -> None:
E TypeError: 'type' object is not subscriptable
I think because the class StateChangeEvent
uses dict
instead of Dict
in his constructor:
With Python 3.9 I don't have that problem, only with Python 3.8.10.
This PR should solve it: https://github.com/conductor-sdk/conductor-python/pull/242
facing same issue on python 3.8.16
Any update on this @v1r3n ?
We are going to soon merge this: https://github.com/conductor-sdk/conductor-python/pull/242