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

Python apprise problem with MQTT notifications #1132

Closed
jds11111 opened this issue Feb 19, 2024 · 0 comments
Closed

Python apprise problem with MQTT notifications #1132

jds11111 opened this issue Feb 19, 2024 · 0 comments

Comments

@jds11111
Copy link

Describe the bug
MQTT notifications fail

To Reproduce
Steps to reproduce the behavior:

  1. Goto Settings -> Tools. Set up MQTT notification
  2. Test it.
  3. View error: ERROR - Could not load MQTT Notification URL: mqtt://hassio:g...l@1...1:1883/birdnet/sightings
  4. Run apprise in CLI:
birdnetpi:~/BirdNET-Pi/birdnet/bin$ ./apprise -vvv -b 'test' "mqtt://username:password@192.168.1.91:1883/birdnet/sightings"
2024-02-19 08:36:08,619 - DEBUG - Language set to en
2024-02-19 08:36:09,099 - DEBUG - Notification Plugin 101(s) and 142 Schema(s) loaded in 0.4715s
Exception ignored in: <function Client.__del__ at 0x7f9614dca0>
Traceback (most recent call last):
  File "/home/pi/BirdNET-Pi/birdnet/lib/python3.9/site-packages/paho/mqtt/client.py", line 874, in __del__
    self._reset_sockets()
  File "/home/pi/BirdNET-Pi/birdnet/lib/python3.9/site-packages/paho/mqtt/client.py", line 1133, in _reset_sockets
    self._sock_close()
  File "/home/pi/BirdNET-Pi/birdnet/lib/python3.9/site-packages/paho/mqtt/client.py", line 1119, in _sock_close
    if not self._sock:
AttributeError: 'Client' object has no attribute '_sock'
2024-02-19 08:36:09,106 - ERROR - Could not load MQTT Notification URL: mqtt://username:password@1...1:1883/birdnet/sightings
2024-02-19 08:36:09,107 - ERROR - There are no service(s) to notify

Additional context
I had the same problem with the previous fork, but couldn't fix it there, either (https://github.com/mcguirepr89/BirdNET-Pi/discussions/321#discussioncomment-8431278)

Your build
Running on RPi4B, latest build. MIgrated over from previous fork (which worked extremely well using the documentation.) I suspect that it is a python version/library problem. This reminds me why I moved many things over to containers because of python problems like this. It is probably not a bug with this software, but hope somebody could point me in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant