auanasgheps/snapraid-aio-script

Problems with apprise

Opened this issue · 4 comments

Describe the bug
I cannot get the script to access apprise correctly.
There are two problems:

Problem 1:
The script always says "apprise has not been found and will be installed... apprise installed successfully."
This happens even if the script has run previously and also this still happens after I manually install apprise.

Problem 2:
The value for APPRISE_BIN set in the config file does not get passed on to the main script.
This means that none of the APPRISE lines work.

To Reproduce
As a test I add the line "echo $APPRISE_BIN" near the top of the main script. The echo command always returns blank.
when I run ' command -v apprise' from the command line, the output is "/home/media/.local/bin/apprise"
So apprise is installed but the APPRISE_BIN variable is not passing through to the main script.

If change the value of APPRISE_BIN to "/home/media/.local/bin/apprise"
Then I get the following error when the script runs:

Sending notification using Apprise service(s).
Traceback (most recent call last):
  File "/home/media/.local/bin/apprise", line 5, in <module>
    from apprise.cli import main
ModuleNotFoundError: No module named 'apprise'

I know that apprise is working outside of the script. Eg when I run the following line from the command line it works fine:
apprise -vv -t 'TEST TITLE' -b 'BODY' APPRISE_URL

Please complete the following information:

  • Distro: Ubuntu 22.04
  • AIO Script Version 3.4 Beta 2

Hi, thanks for reporting an issue on this new feature, I was looking forward to see something like this.

The script checks if apprise is installed by executing dpkg-query -W -f='${Status}' apprise
What happens on your server if you run this manually?

Also, the scripts attemps to use the apprise binary by executing command -v apprise
What happens on your server if you run this manually?

Also, what version of Apprise are you using? For example I've noticed that Debian has very, very old Apprise version in their repo. I might turn off automatic Apprise installation if I can't find an easy way to install the latest.

I've found the solution to the version issue. I'll be using pip to do this, which will be installed to install apprise. I know it's not super efficient but it's the only way to ensure a recent version of apprise is installed. When I started testing it, I started with the one in the Debian repo and it was super old.

Glad you have the install issue figured out!
When i enter the "command -v apprise" in the terminal, it returns the folder where apprise is installed on my system ("/home/media/.local/bin/apprise"). Nothing else happens.
I'm using apprise version 1.9.1

Have you installed apprise using pipx?
Execute pipx ensurepath and try again.