ironsheep / RPi-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
GNU General Public License v3.0
475 stars 64 forks source link

TypeError: 'NoneType' object is not callable #93

Closed andresb5555 closed 1 year ago

andresb5555 commented 1 year ago

Hi,

After upgrading to version 1.8.3 following happens after few hours of running.

root@pii:~# systemctl status isp-rpi-reporter.service ● isp-rpi-reporter.service - RPi Reporter MQTT Client/Daemon Loaded: loaded (/opt/RPi-Reporter-MQTT2HA-Daemon/isp-rpi-reporter.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-03-21 18:08:24 EET; 3 days ago Docs: https://github.com/ironsheep/RPi-Reporter-MQTT2HA-Daemon Main PID: 132416 (python3) Status: "Mar 21 18:08:23 - NOTIFY: MQTT connection established." Tasks: 2 (limit: 8986) CPU: 11min 34.691s CGroup: /system.slice/isp-rpi-reporter.service └─132416 /usr/bin/python3 -u /opt/RPi-Reporter-MQTT2HA-Daemon/ISP-RPi-mqtt-daemon.py

Mar 21 18:08:19 pii systemd[1]: Starting RPi Reporter MQTT Client/Daemon... Mar 21 18:08:24 pii systemd[1]: Started RPi Reporter MQTT Client/Daemon. Mar 21 23:41:48 pii python3[132416]: Traceback (most recent call last): Mar 21 23:41:48 pii python3[132416]: File "/opt/RPi-Reporter-MQTT2HA-Daemon/ISP-RPi-mqtt-daemon.py", line 1828, in Mar 21 23:41:48 pii python3[132416]: getNumberOfAvailableUpdates()() # and count them! Mar 21 23:41:48 pii python3[132416]: TypeError: 'NoneType' object is not callable

Regards, ANdres

sholdee commented 1 year ago

I am experiencing the same issue.

tacognito commented 1 year ago

Me too. Happy to provide extra info if required.

tacognito commented 1 year ago

I think the issue is very simple, a typo. It is calling function getNumberOfAvailableUpdates()(), but should be getNumberOfAvailableUpdates(), so without the double parentheses. I'll manually change it and see whether the issue disappears.

tacognito commented 1 year ago

Has run flawless since

ironsheep commented 1 year ago

Geez. Thank you @andresb5555 and @tacognito for reporting this.

Fixes committed and will appear in v1.8.4 and later. Now we don't have to rely on the autorestart of a crashed daemon to keep it running! Sigh... (walks away with head down). ;-)