caronc / nzb-notify

Push Notifications to a large number of supported services for NZBGet and SABnzbd (based on Apprise)
GNU General Public License v3.0
129 stars 16 forks source link

Telegram error #56

Closed kilgil27 closed 5 years ago

kilgil27 commented 5 years ago

I'm getting the following error when trying to test my notifications through Sabnzbd for Telegram

Notification script returned exit code 1 and output "'"python"' is not recognized as an internal or external command, operable program or batch file."

If I try to run the script directly through command prompt, I get the following error:

C:\WINDOWS\system32>python C:\Tools\nzb-notify\sabnzbd-notify.py complete 'Hello' 'World' tgram://610278560:AAFFeg-b4GBjUaMyCAyl2XlOKclskODkCdc/90842913 Traceback (most recent call last): File "C:\Tools\nzb-notify\Notify.py", line 159, in from nzbget import SCRIPT_MODE ImportError: No module named nzbget

Not sure where I'm going wrong here. Python is installed and I added it to my PATH environment variable. If I open up command prompt and simply type "python" it shows 2.7.16 is installed

kilgil27 commented 5 years ago

Well I updated SAB to 2.3.9 and that fixed the "python is not recognized" error, but now I'm getting the same error in SAB when I try to test as when I run the script manually through command prompt

Notification script returned exit code 1 and output "Traceback (most recent call last): File "C:\Program Files\SABnzbd\scripts\Notify.py", line 159, in from nzbget import SCRIPT_MODE ImportError: No module named nzbget"

caronc commented 5 years ago

Hi

Sorry you're having these difficulties.

I'm just curious how you're installing this package? I can see from your error you're locating this in C:\Tools\nzb-notify\sabnzbd-notify.py So you should have a C:\Tools\nzb-notify\Notify directory then too. The error you're getting implies it might be missing on you. The directory should exist if you're just downloading the package from this repository to install it.

Try extracting the nzb-notify package again; make sure to keep this directory structure (at the bare minimum):

C:\Tools\nzb-notify\Notify
C:\Tools\nzb-notify\Notify.py
C:\Tools\nzb-notify\sabnzbd-notify.py

Good luck!

kilgil27 commented 5 years ago

Okay I re-downloaded and extracted to the C drive under the same path, as seen here

I changed SABs script directory to point there https://i.imgur.com/IXKHcIZ.png

SAB sees it and lets me select the sabnzbd-notify.py script but I still get the error that there is no module for nzbget

https://i.imgur.com/BnLJLEe.png

Thanks for your help

caronc commented 5 years ago

From the command line try typing:

pip install pynzbget
kilgil27 commented 5 years ago

here is what I get

I upgraded pip after I ran that. Now I get a NEW error in SABnzbd when testing the notification, that's progress I guess. see below:

Notification script returned exit code 1 and output "Traceback (most recent call last): File "C:\Tools\nzb-notify\Notify.py", line 165, in from apprise import Apprise ImportError: No module named apprise"

caronc commented 5 years ago

I'm having a bit of a brain fart and forgot that this is all documented on the main page :wink:

You need to just install the rest of the requirements, try:

pip install -r C:\Tools\nzb-notify\requirements.txt

This will install all of the rest of the dependencies you need.

kilgil27 commented 5 years ago

Dude... I don't know how I got this far and managed to miss that. That did the trick!

I'm sorry and thanks for taking the time to help out

caronc commented 5 years ago

Hah, i feel worse for not telling you this after you first posted! :slightly_smiling_face:

I'm glad you're up and going. I'm going to close this ticket now, but feel free to re-open it if you have any more issues (or have a new one!)