Closed StevenBrs closed 1 year ago
@StevenBrs Oops that's an issue that I've created in my hunt for more error information. Thank you for submitting. I will fix this ASAP. (this evening I guess).
Thank you for your excellent description, logging and reproduction steps. It made pinpointing the problem very easy!
Hi @Sholofly My pleasure. I wish I could contribute more, but my python skills are limited:-) Thanks for creating this plugin and letting us use it. I honestly appreciate that very much! And so far so good: fix confirmed :-)
Describe the bug The TVbox integration fetches status & info correctly when starting up HA, but after a while the information doesn't update anymore. (Telenet Belgium)
To Reproduce
Expected behavior Power state should reflect the real power state, and Media Control Card should give some graphic footage of the current content playing
Screenshots
Version of the component v0.3.4
Logging Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.10/site-packages/backoff/_common.py:120 First occurred: 11:42:35 AM (1 occurrences) Last logged: 11:42:35 AM
Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl. Error:404 Client Error: Not Found for url: https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl)
Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py:271 First occurred: 11:42:35 AM (1 occurrences) Last logged: 11:42:35 AM
Could not handle status message
Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py:273 First occurred: 11:42:35 AM (1 occurrences) Last logged: 11:42:35 AM
Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003972776805', 'messageTimeStamp': 1669718548887, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1669708218485, 'source': {'channelId': 'telenet3', 'eventId': 'telenet3'}}, 'uiState': {}}}
Logger: lghorizon.models Source: /usr/local/lib/python3.10/site-packages/paho/mqtt/client.py:2529 First occurred: 11:42:35 AM (1 occurrences) Last logged: 11:42:35 AM
Caught exception in on_message: format_exception() got an unexpected keyword argument 'etype'
Logger: root Source: /usr/src/homeassistant/homeassistant/bootstrap.py:342 First occurred: 11:42:35 AM (1 occurrences) Last logged: 11:42:35 AM
Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 320, in _do_api_call api_response.raise_for_status() File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 269, in _on_mqtt_message self._handle_box_update(deviceId, message) File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 296, in _handle_box_update raw_replay_event = self._do_api_call(f"{self._country_settings['api_url']}/eng/web/linear-service/v2/replayEvent/{eventId}?returnLinearContent=true&language={self._country_settings['language']}") File "/usr/local/lib/python3.10/site-packages/backoff/_sync.py", line 105, in retry ret = target(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 323, in _do_api_call raise LGHorizonApiConnectionError(f"Unable to call {url}. Error:{str(httpEx)}") lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl. Error:404 Client Error: Not Found for url: https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/usr/local/lib/python3.10/site-packages/lghorizon/models.py", line 321, in _on_client_message self._on_message_callback(jsonPayload) File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 274, in _on_mqtt_message _logger.error(repr(traceback.format_exception(etype=exc_type, value = exc_value, tb=exc_traceback))) TypeError: format_exception() got an unexpected keyword argument 'etype'
Additional context