mcguirepr89 / BirdNET-Pi

A realtime acoustic bird classification system for the Raspberry Pi 4B, 3B+, and 0W2 built on the TFLite version of BirdNET.
Other
1.31k stars 139 forks source link

Latest version adds two lines to the message body that mess up JSON (need python help) #1157

Open jds11111 opened 8 months ago

jds11111 commented 8 months ago

https://github.com/mcguirepr89/BirdNET-Pi/discussions/342#discussioncomment-8736402

jds11111 commented 8 months ago

The issue seems to be in notifications.py, lines 163 and 213 add lines that will not fit in JSON, so problematic for MQTT notification with apprise. If they were replaced with something like

.replace("$reason", " (only seen " + str(int(numberDetections)) + " times in last 7d)")

But I don't really know python well enough to know if this is correct.

jds11111 commented 8 months ago

Maybe I should just put in a PR that comments these out of the message body.