I’m not sure if this error is new or not, or how often it occurs, but I discovered it in the logs while trying to debug something else…
2020-11-02 21:59:28 ERROR (MainThread) [homeassistant.helpers.entity] Update for weather.richmond fails
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 309, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 164, in _new_conn
raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7ff4cb672f70>, 'Connection to dd.weather.gc.ca timed out. (connect timeout=10)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 446, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='dd.weather.gc.ca', port=443): Max retries exceeded with url: /air_quality/aqhi/pyr/forecast/realtime/xml/AQ_FCST_JBRIK_CURRENT.xml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7ff4cb672f70>, 'Connection to dd.weather.gc.ca timed out. (connect timeout=10)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 482, in async_device_update
await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/environment_canada/weather.py", line 166, in update
self.ec_data.update()
File "/usr/local/lib/python3.8/site-packages/env_canada/ec_data.py", line 204, in res
return fun(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/ratelimit/decorators.py", line 80, in wrapper
return func(*args, **kargs)
File "/usr/local/lib/python3.8/site-packages/env_canada/ec_data.py", line 364, in update
aqhi_result = requests.get(AQHI_FORECAST_URL.format(self.aqhi_id[0],
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 504, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='dd.weather.gc.ca', port=443): Max retries exceeded with url: /air_quality/aqhi/pyr/forecast/realtime/xml/AQ_FCST_JBRIK_CURRENT.xml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7ff4cb672f70>, 'Connection to dd.weather.gc.ca timed out. (connect timeout=10)'))
I’m running HA 0.117.2