I regularly get errors in my log for some of the various scrape sensors I have in my config.
One of them is the HA’s version:
2018-10-19 11:54:19 ERROR (SyncWorker_9) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from https://www.home-assistant.io/ failed with ('Connection aborted.', OSError(0, 'Error'))
2018-10-19 11:54:19 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ha_online_version fails
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/src/app/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_job(self.update)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/sensor/scrape.py", line 117, in update
raw_data = BeautifulSoup(self.rest.data, 'html.parser')
File "/usr/local/lib/python3.6/site-packages/bs4/__init__.py", line 246, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'NoneType' has no len()
and here is how I defined my scrape sensor:
- platform: scrape
resource: https://www.home-assistant.io
name: ha_online_version
select: ".current-version h1"
value_template: '{{ value.split(":")[1] }}'
Any idea what could be at play here?
I have the same for my HA Podcast sensor:
2018-10-19 11:48:38 ERROR (SyncWorker_8) [homeassistant.components.sensor.rest] Error fetching data: <PreparedRequest [GET]> from https://hasspodcast.io/feed/podcast failed with HTTPSConnectionPool(host='hasspodcast.io', port=443): Read timed out.
2018-10-19 11:48:38 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.ha_podcast_track fails
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/src/app/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_job(self.update)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/sensor/scrape.py", line 117, in update
raw_data = BeautifulSoup(self.rest.data, 'html.parser')
File "/usr/local/lib/python3.6/site-packages/bs4/__init__.py", line 246, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'NoneType' has no len()
with config:
- platform: scrape
resource: https://hasspodcast.io/feed/podcast
name: ha_podcast
select: 'enclosure:nth-of-type(1)'
attribute: url