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

Missing Module 'nzbget' #91

Open gadkarisid opened 1 year ago

gadkarisid commented 1 year ago

I had Discord notifications working just fine until recently when I upgraded my system to Ubuntu 22.04.1 LTS. I think as part of the install Python 2.7 was automatically removed, so now I only have Python 3. Since then, I'm getting an error in sabnzbdplus saying that the nzbget module is missing when I try to send notifications. I have confirmed that all dependencies are present via pip, and when I run a test from CLI using Apprise, it connects to Discord and sends the message successfully.

Output of pip dependency check: user@downloader:/usr/share/sabnzbdplus/scripts$ pip install -r requirements.txt Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: apprise>=0.7.0 in /home/sid/.local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (1.0.0) Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2)) (59.6.0) Requirement already satisfied: pynzbget in /home/sid/.local/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (0.6.4) Requirement already satisfied: chardet in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4)) (4.0.0) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from -r requirements.txt (line 5)) (1.16.0) Requirement already satisfied: PyYAML in /usr/lib/python3/dist-packages (from apprise>=0.7.0->-r requirements.txt (line 1)) (5.4.1) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from apprise>=0.7.0->-r requirements.txt (line 1)) (2.25.1) Requirement already satisfied: requests-oauthlib in /home/sid/.local/lib/python3.10/site-packages (from apprise>=0.7.0->-r requirements.txt (line 1)) (1.3.1) Requirement already satisfied: click>=5.0 in /usr/lib/python3/dist-packages (from apprise>=0.7.0->-r requirements.txt (line 1)) (8.0.3) Requirement already satisfied: markdown in /usr/lib/python3/dist-packages (from apprise>=0.7.0->-r requirements.txt (line 1)) (3.3.6) Requirement already satisfied: lxml>=2.7 in /home/sid/.local/lib/python3.10/site-packages (from pynzbget->-r requirements.txt (line 3)) (4.9.1) Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib->apprise>=0.7.0->-r requirements.txt (line 1)) (3.2.0)

Output from Apprise CLI test: user@downloader:/usr/share/sabnzbdplus/scripts$ apprise -vv -t "Test Message Title" -b "Test message body" https://discord.com/api/webhooks/[redacted]/[redacted] 2022-10-03 13:02:53,487 - INFO - Notifying 1 service(s) asynchronously. 2022-10-03 13:02:53,898 - INFO - Sent Discord notification.

Exact error in sabnzbd: Notification script returned exit code 1 and output "Traceback (most recent call last): File "/usr/share/sabnzbdplus/scripts/Notify.py", line 174, in from nzbget import SCRIPT_MODE ModuleNotFoundError: No module named 'nzbget' "

I'm happy to send any diagnostic info you may need :)

System Details: OS: Ubuntu 22.04.1 LTS Python Version: 3.10.6

gadkarisid commented 1 year ago

UPDATE:

SOLVED!!! So it turned out that the various dependencies were being installed by pip in my user folder, but I think sabnzbd is running as root, so the dependencies appeared to be missing. I re-ran the pip install command with sudo and it installed the dependencies into my root user's folder and everything started working again.