[PP-Script] NotifyPlex - Library Update and GUI Notification

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by hugbug » 02 Sep 2016, 04:41

You don't need debug version of nzbget. You need to modify the script and add extra log messages around the message in question to understand why the script thinks that download has failed.

konubywy
Posts: 16
Joined: 05 Nov 2015, 15:07

Re: [PP-Script] NotifyPlex - Library Update and GUI Notifica

Post by konubywy » 02 Sep 2016, 07:27

Unfortunately for me, that is actually beyond my skillset to do such a thing :cry:

fleXible
Posts: 12
Joined: 29 Aug 2019, 07:48

Re: [PP-Script] NotifyPlex - Library Update and GUI Notification

Post by fleXible » 30 Aug 2019, 22:23

From time to time I experienced the same problem, but wasn't big enough to dive into it. Till yesterday...

In line 108 the status is checked for "SUCCESS/ALL" to determine whether to notify the plex server.
But according to the nzbget documentation at https://nzbget.net/api/history there are more status signalling success.

Change the line to:

Code: Select all

ppStatus = os.environ['NZBPP_STATUS'].startswith('SUCCESS/')
Tell me, if it works


mannibis
Posts: 60
Joined: 29 Jul 2014, 15:10

Re: [PP-Script] NotifyPlex - Library Update and GUI Notification

Post by mannibis » 20 Aug 2020, 00:21

I have added python3 compatibility and also started to store the auth_token to disk, so that the script does not sign-in with plex.tv every time it is ran. The auth_token will be re-used after the initial sign-in.

I have also created a GitHub repo here: https://github.com/mannibis/NotifyPlex in case anyone wants the newest version

mouzzampk2014
Posts: 34
Joined: 13 Feb 2019, 02:23

Re: [PP-Script] NotifyPlex - Library Update and GUI Notification

Post by mouzzampk2014 » 12 Sep 2020, 20:05

Hi all,

Need little guidance. I am using linuxserver/nzbget image and getting this message. Thank you

Code: Select all

Executing script NotifyPlex/NotifyPlex.py with command ConnectionTest
NotifyPlex: Fixing permissions for/shared/downloads/usenet/scripts/NotifyPlex/NotifyPlex.py
NotifyPlex: Traceback (most recent call last):
NotifyPlex:   File "/shared/downloads/usenet/scripts/NotifyPlex/NotifyPlex.py", line 102, in <module>
NotifyPlex:     import requests
NotifyPlex: ModuleNotFoundError: No module named 'requests'
Script NotifyPlex/NotifyPlex.py with command ConnectionTest failed (terminated with unknown status)

owine
Posts: 6
Joined: 05 Jan 2020, 00:02

Re: [PP-Script] NotifyPlex - Library Update and GUI Notification

Post by owine » 14 Sep 2020, 13:49

mouzzampk2014 wrote:
12 Sep 2020, 20:05
Hi all,

Need little guidance. I am using linuxserver/nzbget image and getting this message. Thank you

Code: Select all

Executing script NotifyPlex/NotifyPlex.py with command ConnectionTest
NotifyPlex: Fixing permissions for/shared/downloads/usenet/scripts/NotifyPlex/NotifyPlex.py
NotifyPlex: Traceback (most recent call last):
NotifyPlex:   File "/shared/downloads/usenet/scripts/NotifyPlex/NotifyPlex.py", line 102, in <module>
NotifyPlex:     import requests
NotifyPlex: ModuleNotFoundError: No module named 'requests'
Script NotifyPlex/NotifyPlex.py with command ConnectionTest failed (terminated with unknown status)
You can either configure your Docker container to install the required pip module at container start or download the source for the requests module from https://pypi.org/project/requests/#files and save the enclosing folder entitled requests in the same folder as NotifyPlex.py.

fleXible
Posts: 12
Joined: 29 Aug 2019, 07:48

Re: [PP-Script] NotifyPlex - Library Update and GUI Notification

Post by fleXible » 07 Oct 2020, 15:38

Need little guidance. I am using linuxserver/nzbget image and getting this message. Thank you
I just had a quick look at the image you use. Regarding installed software packages it comes just with the bare minimum. For python not even pip is available. Weird thing is, while building the docker image, it was installed, but got removed as a "development dependency".

To reinstall pip and a bunch of other widely used modules, you can use this command:

Code: Select all

docker exec -it nzbget apk add py3-pip
This will keep working even across container restarts.

I wouldn't recommend putting modules inside the script directory. In the long-run it will lead to weird dependency problems and upgrading is short of impossible.

barenaked
Posts: 21
Joined: 20 May 2017, 13:27

Re: [PP-Script] NotifyPlex - Library Update and GUI Notification

Post by barenaked » 11 Apr 2023, 05:09

Hi, I'm trying to use this script on a Synology NAS with DSM 7.1 installed. Got nzbget compatible with dsm7 from the syno-community, python 2 is deprecated and replaced by python 3. I installed the requests module via PIP but I get the following error right from the start:

Code: Select all

NotifyPlex: AttributeError: module 'requests' has no attribute 'post'

NotifyPlex: except requests.exceptions.RequestException or OSError:

NotifyPlex: During handling of the above exception, another exception occurred:

NotifyPlex: AttributeError: module 'requests' has no attribute 'exceptions'

Script NotifyPlex/NotifyPlex.py with command ConnectionTest failed (terminated with unknown status)


Locked

Who is online

Users browsing this forum: No registered users and 15 guests