Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'type' object is not subscriptable #247

Open
andreapairon opened this issue Feb 5, 2024 · 3 comments
Open

TypeError: 'type' object is not subscriptable #247

andreapairon opened this issue Feb 5, 2024 · 3 comments

Comments

@andreapairon
Copy link

andreapairon commented Feb 5, 2024

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:

err

With Python 3.9 I don't have that problem, only with Python 3.8.10.

This PR should solve it: #242

@pyarun
Copy link

pyarun commented May 22, 2024

facing same issue on python 3.8.16

@anup-a
Copy link

anup-a commented Jun 20, 2024

Any update on this @v1r3n ?

@v1r3n
Copy link
Member

v1r3n commented Jun 20, 2024

We are going to soon merge this:
#242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants