-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Notification script returned exit code 1 and output "Traceback (most recent call last) #72
Comments
You're just missing the plugins that this script relies on: pip install -r requirements.txt
#alternatively this should work too:
pip install pynzbget |
Actually I did install all requirements and tested this 'pip install pynzbget' and it also said requirements already satisfied. |
Strange, is SABnzbd running in a Docker container? These commands need to be ran in there if so. What is your os? Also, what version of Python and SABnzbd are you using? |
No docker and using ubuntu 18.04 |
I wonder if this is an issue with multiple python versions. Can you try same pip commands, but use |
Already did too, all requirements satisfied as well |
The last few things you could try is manually running the script yourself to see if you get the same error: # Just to test things:
python /path/to/sabnzbd/sabnzbd-notify.py complete 'Hello' 'World' <Apprise URL here> If that works then there is something unique about your SABnzbd installation; the environment it runs in is completely different the the one you're in when you call the script. Perhaps a Python virtual env? If that doesn't work, then the problem gets a bit easier to solve because at least it's reproducible |
Sorry for the long delay; It seems like your pip repository got damaged or corrupted some how. I would just uninstall pynzbget and put it back in. Hopefully the system will pick it up then: pip uninstall pynzbget
pip install pynzbget |
Hey |
that's really weird, there is definitely something wrong with your environment 🙁 . i verified the script works correctly by doing the following myself: # create a new virtual environment to test with:
python3 -m venv test-nzb-notfify
# Change into our new directory
cd test-nzb-notfify
# Activate our virtual environment
source bin/activate
# Install pynzbget
pip install pynzbget
# test that the environment variables are importable:
python -c "from nzbget import SCRIPT_MODE" && echo "OKAY" || or echo "Fail" The above outputs Another possibility is there is another Python library called You could check inside your SABnzbd installation directory and make sure there is no directory called # in a python terminal:
import nzbget
# If the above does not give you an error then something was found and imported...
# Test that it is a module:
print(type(nzbget))
# expect output like: <class 'module'>
# Now find out where this module came from:
print(nzbget.__file__)
# Verify that the path that is outputed is indeed where you installed pynzbget; My guess is this
# is not valid package. Or if it is (that's fine too), but it isn't the one you want :slightly_smiling_face: |
Hi Thanks for chekcing further So actually looking in my SABnzbd directory I found another file 'init.py' Then I aslo ran a python terminal with first command and it gave me this : (1:355)# python
|
So i can see one problem already; up above, you said:
SABnzbd requries Python v3. so this all makes sense. But your last comment shows you running the test using Python v2.7 (which operates in a completely different realm and requires a separate pip installation for it). In a situation where you have both Python v2 and v3, you need to use pip3 or pip to separate the calls. You also need to use the binary
Is it possible that pynzbget is properly installed in your Python 3 environment and both you and your SABnzbd is running in a Python 2 environment? Another issue that can cause problems is stale find /path/to/your/sabnzbd/installation -type f -name '*.pyc' --delete |
So the catch is, you can't just change to use the python 3 binary you have installed on the Quickbox Pro setup. You need to change your environment as well so your virtually sitting in the same world as SABnzbd is. I don't know much about Quickbox Pro or how SABnzbd gets installed into it with a custom version of Python. You'll need to mimic it's environment variables and stuff since entries like PYTHONPATH for example can cause your application to look in one location for all of it's packages while you install it in another. Do you have the instructions or tricks you did to install SABnzbd? Does Quickbox just run natively on a server? Or is it like managing docker containers for you? It might be setting up virtual environments so that some applications don't step on others? |
Hi Thanks for checking all this, I'll share this case with Quickbox Pro support team because honestly I don't have so much information abaout hw it works etc... Thank you for the support again ! |
Hey, If you have python3 on your system as well, but python2 is still the system default just edit sabnzbd-notify.py and Notify.py and change: #!/usr/bin/env python It is what I had to do in my multi-python system. Working fine now when it invokes python3. -Squigs |
Hey @Squiggles4321 Thanks ! |
Very specific to your environment then. Good luck. -Squigs |
I'm closing this ticket off; unfortunately it's 100% related to the python installation and it's configured environment |
❓ Question
hey ! trying to set up the notify script on SABnzbd for Discord.
Well installed all files on home/user/SABnzbd/scripts
Did a chmod +x to make them executable
Also in "parameters" field I've set my Discord webhook URL.
But on SABnzbd when triggering the test notification i get the following error :
Notification script returned exit code 1 and output "Traceback (most recent call last): File "/home/suissonabisso/SABnzbd/scripts/Notify.py", line 174, in from nzbget import SCRIPT_MODE ImportError: No module named nzbget "
What I've missed ?
Thank you !
The text was updated successfully, but these errors were encountered: