Hi,
Sometimes the scraper fails and does not recover till next restart:
2021-03-24 08:43:51 ERROR (MainThread) [homeassistant.components.sensor] scrape: Error on device update!
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 360, in _async_add_entity
await entity.async_device_update(warning=False)
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 465, in async_device_update
await task
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/scrape/sensor.py", line 139, in async_update
await self.rest.async_update()
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/rest/data.py", line 55, in async_update
response = await self._async_client.request(
File "/srv/homeassistant/lib/python3.8/site-packages/httpx/_client.py", line 1371, in request
response = await self.send(
File "/srv/homeassistant/lib/python3.8/site-packages/httpx/_client.py", line 1406, in send
response = await self._send_handling_auth(
File "/srv/homeassistant/lib/python3.8/site-packages/httpx/_client.py", line 1444, in _send_handling_auth
response = await self._send_handling_redirects(
File "/srv/homeassistant/lib/python3.8/site-packages/httpx/_client.py", line 1476, in _send_handling_redirects
response = await self._send_single_request(request, timeout)
File "/srv/homeassistant/lib/python3.8/site-packages/httpx/_client.py", line 1502, in _send_single_request
(status_code, headers, stream, ext,) = await transport.arequest(
File "/srv/homeassistant/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 208, in arequest
connection = await self._get_connection_from_pool(origin)
File "/srv/homeassistant/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 248, in _get_connection_from_pool
if connection.is_socket_readable():
File "/srv/homeassistant/lib/python3.8/site-packages/httpcore/_async/connection.py", line 168, in is_socket_readable
return self.connection is not None and self.connection.is_socket_readable()
File "/srv/homeassistant/lib/python3.8/site-packages/httpcore/_async/http11.py", line 205, in is_socket_readable
return self.socket.is_readable()
File "/srv/homeassistant/lib/python3.8/site-packages/httpcore/_backends/asyncio.py", line 182, in is_readable
return is_socket_readable(sock.fileno())
AttributeError: 'NoneType' object has no attribute 'fileno'
Reported on HA 2021.3.2