Description
On Raspberry Pi (Debian Bullseye) using pip3 install method the script ends up in /home/[username]/.local/bin/outage_detector and NOT /usr/bin, as a result the crontab settings fail.
Using "crontab -e" to manually change the path for the outage_detector script resolves the issue.
Apologies I don't know enough to figure out how to fix this in python, but I guess you need to add a sanity check for where pip3 defaults to in Bullseye?
I have recreated this issue (and fixed it) on both a Raspberry Pi 4 and a Raspberry Pi 0 W using the most recent (as of this week) Raspberian Bullseye image.
(It's also necessary to add /home/[username]/.local/bin/outage_detector to the $PATH variable to be able to call it from another directory, but I'm not sure that's an issue so much as just how things work when they're installed to that location. I fixed it by adding "PATH=$PATH:/home/[username]/.local/bin/outage_detector" to the .bashrc startup config.)