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

Uncaught exception if HomeAssistant cannot be reached #56

Closed
NeonDaniel opened this issue May 7, 2024 · 0 comments
Closed

Uncaught exception if HomeAssistant cannot be reached #56

NeonDaniel opened this issue May 7, 2024 · 0 comments

Comments

@NeonDaniel
Copy link
Member

I believe the root cause for this error is a change in my network/nginx configuration, but in any case a non-static IP address could case a similar issue and should probably be caught/handled more nicely.

2024-05-07 15:09:14.734 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:_connect:64 - ERROR - 
Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 663, in __await_impl__
    _transport, _protocol = await self._create_connection()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1060, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 969, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 501, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/neon/venv/lib/python3.10/site-packages/ovos_PHAL_plugin_homeassistant/logic/socketclient.py", line 48, in _connect
    self.websocket = await websockets.connect(uri)
  File "/home/neon/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 659, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
2024-05-07 15:09:14.741 - enclosure - ovos_PHAL_plugin_homeassistant.logic.socketclient:run:246 - INFO - self.loop.is_running=False
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