Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'NoneType' object is not callable #93

Closed
andresb5555 opened this issue Mar 24, 2023 · 5 comments
Closed

TypeError: 'NoneType' object is not callable #93

andresb5555 opened this issue Mar 24, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@andresb5555
Copy link

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
Copy link

sholdee commented Mar 24, 2023

I am experiencing the same issue.

@tacognito
Copy link

Me too. Happy to provide extra info if required.

@tacognito
Copy link

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
Copy link

Has run flawless since

@ironsheep ironsheep self-assigned this Mar 29, 2023
@ironsheep ironsheep added the bug Something isn't working label Mar 29, 2023
@ironsheep
Copy link
Owner

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). ;-)

ironsheep added a commit that referenced this issue Mar 29, 2023
- Remove unused Requirements file from repo. (#92)
- Fix code which calls getNumberOfAvailableUpdates() after initial call at startup (#93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants