home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.43k stars 30.67k forks source link

Scrape sensor integration doesn't work on 0.106 #32100

Closed mig2008pt closed 4 years ago

mig2008pt commented 4 years ago

The problem

Scrape sensor doesn't work anymore in 0.106

Environment

arch armv7l
dev false
docker false
hassio false
os_name Linux
python_version 3.7.3
timezone Europe/Lisbon
version 0.106.0b2
virtualenv true

Problem-relevant configuration.yaml

- platform: scrape
  resource: https://www.home-assistant.io
  name: Release
  scan_interval: '01:00:00'
  select: ".current-version h1"
  value_template: '{{ value.split(":")[1] }}'

Traceback/Error logs

Log Details (ERROR)
Logger: homeassistant.config 
First occured: 1:52:52 (2 occurences) 
Last logged: 1:52:52

Platform error: sensor
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config.py", line 752, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/loader.py", line 277, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/scrape/sensor.py", line 8, in <module>
    from homeassistant.components.rest.sensor import RestData
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/rest/sensor.py", line 6, in <module>
    from jsonpath import jsonpath
ModuleNotFoundError: No module named 'jsonpath'

Additional information

probot-home-assistant[bot] commented 4 years ago

Hey there @fabaff, mind taking a look at this issue as its been labeled with a integration (scrape) you are listed as a codeowner for? Thanks!