Stack trace due to unhandled requests exception
PhracturedBlue opened this issue · 0 comments
PhracturedBlue commented
I had a case where pyecobee tried to get data but apparently the internet connection was down. That resulted in this bug:
home-assistant/core#10892
Specifically this stack trace:
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 306, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/ecobee.py", line 97, in update
self.ecobee.update()
File "/srv/homeassistant/lib/python3.6/site-packages/pyecobee/__init__.py", line 169, in update
self.get_thermostats()
File "/srv/homeassistant/lib/python3.6/site-packages/pyecobee/__init__.py", line 133, in get_thermostats
request = requests.get(url, headers=header, params=params)
File "/srv/homeassistant/lib/python3.6/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.ecobee.com', port=443): Max retries exceeded with url: /1/thermostat?json=%7B%22selection%22%3A%7B%22selectionType%22%3A%22registered%22%2C%22includeRuntime%22%3A%22true%22%2C%22includeSensors%22%3A%22true%22%2C%22includeProgram%22%3A%22true%22%2C%22includeEquipmentStatus%22%3A%22true%22%2C%22includeEvents%22%3A%22true%22%2C%22includeWeather%22%3A%22true%22%2C%22includeSettings%22%3A%22true%22%7D%7D (Caused by SSLError(CertificateError("hostname 'api.ecobee.com' doesn't match either of 'www.ecobee.com', 'ecobee.com'",),))