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

Errors on token #27

Open
fmarzocca opened this issue Jan 26, 2024 · 0 comments
Open

Errors on token #27

fmarzocca opened this issue Jan 26, 2024 · 0 comments

Comments

@fmarzocca
Copy link

I am getting this error when running the example:

Traceback (most recent call last):
  File "/home/boss/.node-red/assets/./testC4.py", line 31, in <module>
    print(asyncio.run(director.getAllItemInfo()))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyControl4/director.py", line 119, in getAllItemInfo
    return await self.sendGetRequest("/api/v1/items")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyControl4/director.py", line 56, in sendGetRequest
    await checkResponseForError(await resp.text())
  File "/usr/local/lib/python3.11/dist-packages/pyControl4/error_handling.py", line 120, in checkResponseForError
    raise exception(response_text)
pyControl4.error_handling.BadToken: {
 "error": "Unauthorized",
 "details": "Expired or invalid token"
}
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

1 participant