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

Problems with apprise #137

Open
vince-p opened this issue Dec 18, 2024 · 6 comments
Open

Problems with apprise #137

vince-p opened this issue Dec 18, 2024 · 6 comments
Labels
bug Something isn't working in progress

Comments

@vince-p
Copy link

vince-p commented Dec 18, 2024

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
@vince-p vince-p added bug Something isn't working to do labels Dec 18, 2024
@auanasgheps
Copy link
Owner

auanasgheps commented Dec 20, 2024

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.

@auanasgheps
Copy link
Owner

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.

@vince-p
Copy link
Author

vince-p commented Dec 21, 2024

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

@auanasgheps
Copy link
Owner

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

@vince-p
Copy link
Author

vince-p commented Jan 16, 2025

Hi, sorry for the slow reply. I didn't install apprise with pipx so that command doesnt work for me.

@auanasgheps
Copy link
Owner

Ok, can you try this approach?
Remove your apprise installation.

Install python3-pipx using your package manager

Run pipx ensurepath
Finally install apprise via pipx
pipx install apprise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress
Projects
None yet
Development

No branches or pull requests

2 participants