Skip to content

pyhaystack.util.state.NotReadyError #118

@showfuture

Description

@showfuture

python: 3.12.1
pyhaystack: 3.0.0
image

    class OpticManager:

        def __init__(self) -> None:
            self.url = f'{SIEMENS_HOST}'

            self.client = pyhaystack.connect(implementation='skyspark',
                                             uri=self.url,
                                             username=SIEMENS_USER_NAME,
                                             password=SIEMENS_PASSWORD,
                                             project=SIEMENS_PROJECT_NAME,
                                             pint=True)

        def get_about(self):
            op = self.client.about()
            op.wait(3)
            about = op.result()
            print(about)

    optic = OpticManager()
    optic.get_about()

When I run this code, it throws an error :

File "/root/.local/share/virtualenvs/siemens-edge-i-9CWoel/lib/python3.12/site-packages/pyhaystack/util/state.py", line 97, in result
    raise NotReadyError()
pyhaystack.util.state.NotReadyError

Why is this happening? Is there something wrong with my code logic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions