ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
267 stars 34 forks source link

AttributeError: 'NoneType' object has no attribute 'find' #79

Closed b10126 closed 2 years ago

b10126 commented 2 years ago

Hi everyone,

The container are based on QNAP Containerstation and the implementation worked fine w/o problems. Since a few weeks I get the following error log in HA.

Any suggestions what's going on?

Thanks in advance.

Logger: custom_components.monitor_docker.helpers Source: custom_components/monitor_docker/helpers.py:118 Integration: Monitor Docker (documentation, issues) First occurred: 08:20:17 (1 occurrences) Last logged: 08:20:17

[Docker]: Can not connect to Docker API ('NoneType' object has no attribute 'find') Traceback (most recent call last): File "/config/custom_components/monitor_docker/helpers.py", line 118, in init if startCount > 0 and url.find("unix:") != 0: AttributeError: 'NoneType' object has no attribute 'find'

b10126 commented 2 years ago

Additionally I've the following error log entry.

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.monitor_docker Source: custom_components/monitor_docker/init.py:118 Integration: Monitor Docker (documentation, issues) First occurred: 08:19:17 (1 occurrences) Last logged: 08:19:17

invalid literal for int() with base 10: '7-qnap3'

ualex73 commented 2 years ago

Can you try the latest 1.12-beta pre-release or download init.py and helpers.py and see if it solves the issue?

lukaszzyla commented 2 years ago

same problem here. tested with 1.12beta - doesnt solve this issue... 2021-11-21 23:27:28 ERROR (Thread-3) [custom_components.docker_monitor] invalid literal for int() with base 10: '7-qnap3'

b10126 commented 2 years ago

I also tried, but didn't solve the problem. Do you need some more information, logs or anything?

ualex73 commented 2 years ago

Can you try 1.12-beta2 (https://github.com/ualex73/monitor_docker/releases/tag/1.12-beta2)? This should resolve the issue.

b10126 commented 2 years ago

perfect work, it does work! thanks a lot for your analysis and solving this problem.