System monitor errors in 0.53.0

I’m getting a lot of errors after upgrading to 0.53.0:

2017-09-10 11:10:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/systemmonitor.py", line 119, in update
    self._state = psutil.disk_usage(self.argument).percent
AttributeError: 'module' object has no attribute 'disk_usage'
2017-09-10 11:10:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/systemmonitor.py", line 133, in update
    self._state = round(psutil.virtual_memory().available / 1024**2, 1)
AttributeError: 'module' object has no attribute 'virtual_memory'
2017-09-10 11:10:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/systemmonitor.py", line 172, in update
    psutil.boot_time())
AttributeError: 'module' object has no attribute 'boot_time'
2017-09-10 11:10:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/sensor/systemmonitor.py", line 141, in update
    self._state = round(psutil.cpu_percent(interval=None))
AttributeError: 'module' object has no attribute 'cpu_percent'

I got the errors too. Just above these errors was something about weather underground. I use those sensors. After a few restarts to trouble shoot, Hass.io would not restart at all. I had to comment out the WU sensors for it to restart.

Are you getting that WU error too? Are you using WU?

I’m not using WU or Hass.io. I’m using DarkSky as weather provider, I don’t have any DarkSky errors.

Just as a complete toss out there; do you reference a file that references another file? For example, my configuration.yaml file referenced (Included) a sensors.yaml file. In the sensors.yaml file, it referenced my secrets.yaml file. The WU component is the only component that I did that to and it was the one that gave me issues after upgrading to 0.53 Hass.io. Well, so far anyway.

I’m having too errors with Weather Underground since 0.53. My WU configuration is in the main configuration file.

Were any of you able to solve this issue? I just added the ‘disk_use’ sensor and started getting this error. This is the block that seems to be causing the problem for me:

  - platform: systemmonitor
    resources:
      - type: disk_use
      - type: disk_use_percent
      - type: disk_free
      - type: memory_free
      - type: load_15m

And here are the errors that I’m getting:

2017-11-02 20:22:45 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/sensor/systemmonitor.py", line 121, in update
    self._state = round(psutil.disk_usage(self.argument).used /
  File "/srv/hass/lib/python3.4/site-packages/psutil/__init__.py", line 2040, in disk_usage
    return _psplatform.disk_usage(path)
  File "/srv/hass/lib/python3.4/site-packages/psutil/_psposix.py", line 131, in disk_usage
    st = os.statvfs(path)
FileNotFoundError: [Errno 2] No such file or directory: ''
2017-11-02 20:22:45 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/sensor/systemmonitor.py", line 124, in update
    self._state = round(psutil.disk_usage(self.argument).free /
  File "/srv/hass/lib/python3.4/site-packages/psutil/__init__.py", line 2040, in disk_usage
    return _psplatform.disk_usage(path)
  File "/srv/hass/lib/python3.4/site-packages/psutil/_psposix.py", line 131, in disk_usage
    st = os.statvfs(path)
FileNotFoundError: [Errno 2] No such file or directory: ''

The issue went away for me when I added arg: / for each of my disk_usage resource types.