Sanderhuisman/docker_monitor

Monitor HA, can cause an error during startup

Opened this issue · 1 comments

I monitor my Home Assistant instance too, and sometimes I get the error below (in the docker logs). I think it is related to my 34 containers, and my HA container is one of the newest/last one ;-)

Exception in thread DockerContainerStats:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/config/custom_components/docker_monitor/helpers.py", line 276, in run
    for name, container in self._api._containers.items():
RuntimeError: dictionary changed size during iteration

Sorry that it took so long, due to sickness I'm not able to work much on this sensor. I (hopefully) fixed it in pull request #22, maybe you can have a look