[SCRIPT] sherpa.sh

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
User avatar
dirkonline
Know my way around
Posts: 234
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa.sh

Post by dirkonline » Mon Jan 06, 2020 7:53 pm

Bartley69 wrote:
Mon Jan 06, 2020 5:19 pm
Hi,

My Sab has stopped processing shows as it says Python 2.7 is no longer supported. Any idea how to fix?

Code: Select all

Please use a newer version of Python.
Python End-of-Life for current versions:
v3.5 in  251 days
v3.6 in  717 days
v3.7 in 1268 days
Python 2.7 is no longer supported.
Thanks.

EDIT:

Not a fix but this buys more time....Found this by suprawsmninja in this thread on github - https://github.com/clinton-hall/nzbToMe ... -570119514

Code: Select all

It's not like python 2.7 will stop working, it's just no longer maintained.
There is no point in nzbToMedia working with 3 when SABnzb only runs on 2.7

Don't bother messing around, simply edit the eol.py file in your nzbToMedia directory, give your self another 100 days.

change
def check(version=None, grace_period=0):
to
def check(version=None, grace_period=100):

and
def raise_for_status(version=None, grace_period=0):
to
def raise_for_status(version=None, grace_period=100):
I just realised this as well, I will have to check your workaround these days, cheers!
Happy new year everyone!

@OneCD maxbe something we could introduce in the current install? Otherwise this is going to pop up all the time and when I last had a look on the SAB Git they were not finished with their migration to Python 3.x or did I miss something`?

User avatar
OneCD
Ask me anything
Posts: 6824
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Tue Jan 07, 2020 2:18 am

Hi guys, happy new year to you both. :D

Clinton recently pushed a commit to modify [eol.py] in nzbToMedia and this problem is no-more.

Your nzbToMedia will need to be updated. This happens when you stop then start the SABnzbd QPKG in your App Center. If you've manually modified any of the nzbToMedia core files, please advise. This will require a git reset first.

Yes, still waiting for a stable Py3 version of each of the sherpa apps. As each one can be converted, I'll update sherpa to do this and post here.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

Bartley69
Getting the hang of things
Posts: 87
Joined: Sat Feb 01, 2014 11:04 am
Location: Perth, Australia

Re: [SCRIPT] sherpa.sh

Post by Bartley69 » Tue Jan 07, 2020 5:19 am

Happy new year @OneCD! Dang I modified mine. Do I just change it back?

User avatar
OneCD
Ask me anything
Posts: 6824
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Tue Jan 07, 2020 6:09 am

Yes, if you can remember exactly what was changed. :)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
dirkonline
Know my way around
Posts: 234
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sherpa.sh

Post by dirkonline » Tue Jan 07, 2020 3:58 pm

OneCD wrote:
Tue Jan 07, 2020 2:18 am
Hi guys, happy new year to you both. :D

Clinton recently pushed a commit to modify [eol.py] in nzbToMedia and this problem is no-more.

Your nzbToMedia will need to be updated. This happens when you stop then start the SABnzbd QPKG in your App Center. If you've manually modified any of the nzbToMedia core files, please advise. This will require a git reset first.

Yes, still waiting for a stable Py3 version of each of the sherpa apps. As each one can be converted, I'll update sherpa to do this and post here.
Ah gotacha, thanks for getting back to us. I just had a quick read up on his issue in GIT and I saw that now as well :) Thanks!

Bartley69
Getting the hang of things
Posts: 87
Joined: Sat Feb 01, 2014 11:04 am
Location: Perth, Australia

Re: [SCRIPT] sherpa.sh

Post by Bartley69 » Tue Jan 07, 2020 4:44 pm

I just navigated to /share/MD0_DATA/Download/nzbToMedia and did "git reset --hard" then "git pull"

Just need to wait for something to download and see if it is all ok.

Thanks OneCD.

jkcchan
Starting out
Posts: 11
Joined: Mon Dec 30, 2019 5:44 am

Re: [SCRIPT] sherpa.sh

Post by jkcchan » Thu Jan 16, 2020 5:22 am

Hi @OneCD,

Thanks so much for this script. Probably the single greatest thing to happen on this forum. I've been using SickChill and it's working great, however my issue arises with OWatcher3 and LazyLibrarian. It was working for a couple days, then stopped. Restarting doesn't work, and re-installing via the script hasn't helped either. Nothing shows up on :5070, :9090, :5299, or anything. SickChill seems to be working fine. Note that I've changed IP since the last time it was working, although this problem was happening pre-IP change.

Please let me know some troubleshooting steps that come to mind. Thanks!
J

User avatar
OneCD
Ask me anything
Posts: 6824
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Thu Jan 16, 2020 5:54 am

Hi and welcome to the forum. :)
jkcchan wrote:
Thu Jan 16, 2020 5:22 am
I've been using SickChill and it's working great, however my issue arises with OWatcher3 and LazyLibrarian. It was working for a couple days, then stopped. Restarting doesn't work, and re-installing via the script hasn't helped either. Nothing shows up on :5070, :9090, :5299, or anything.
What is your NAS model and firmware version?

Can you please post the package init logs?

Code: Select all

cat /var/log/OWatcher3.log
cat /var/log/LazyLibrarian.log

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jkcchan
Starting out
Posts: 11
Joined: Mon Dec 30, 2019 5:44 am

Re: [SCRIPT] sherpa.sh

Post by jkcchan » Mon Jan 27, 2020 2:34 am

NAS Model: TS-231P
Firmware: 4.4.1.1146

Code: Select all

-------------------- start requested --------------------
= Sun Jan  5 16:38:34 GMT 2020
= (OWatcher3) is not active
* updating (OWatcher3): OK
= result: 0
= PullGitRepo(): 'Fetching origin
HEAD is now at c64df06 Merge pull request #111 from barbequesauce/barbequesauce-patch-1
Already up to date.'
* starting (OWatcher3): OK
-------------------- stop requested --------------------
= Mon Jan  6 10:16:56 GMT 2020
= (OWatcher3) is not active
-------------------- start requested --------------------
= Mon Jan  6 10:17:02 GMT 2020
= (OWatcher3) is not active
* updating (OWatcher3): OK
= result: 0
= PullGitRepo(): 'Fetching origin
HEAD is now at c64df06 Merge pull request #111 from barbequesauce/barbequesauce-patch-1
Already up to date.'
* starting (OWatcher3): OK
-------------------- stop requested --------------------
= Wed Jan 15 15:50:54 GMT 2020
= (OWatcher3) is not active
-------------------- start requested --------------------
= Wed Jan 15 15:51:01 GMT 2020
= (OWatcher3) is not active
* updating (OWatcher3): OK
= result: 0
= PullGitRepo(): 'Fetching origin
From https://github.com/barbequesauce/Watcher3
   c64df06..87a4518  master     -> origin/master
HEAD is now at 87a4518 fix adding torrent to deluge web 2.x, fixes #80
Already up to date.'
* starting (OWatcher3): OK
-------------------- stop requested --------------------
= Wed Jan 15 16:07:59 GMT 2020
= (OWatcher3) is not active
-------------------- start requested --------------------
= Wed Jan 15 16:08:09 GMT 2020
= (OWatcher3) is not active
* updating (OWatcher3): OK
= result: 0
= PullGitRepo(): 'Fetching origin
HEAD is now at 87a4518 fix adding torrent to deluge web 2.x, fixes #80
Already up to date.'
* starting (OWatcher3): OK

Code: Select all

[~] # cat /var/log/LazyLibrarian.log
-------------------- start requested --------------------
= Sun Jan  5 16:39:04 GMT 2020
= (LazyLibrarian) is not active
* updating (LazyLibrarian): OK
= result: 0
= PullGitRepo(): 'Fetching origin
From https://gitlab.com/LazyLibrarian/LazyLibrarian
   29c79b77..ba156875  master     -> origin/master
HEAD is now at ba156875 Move toggles to right side for remaining pages
Already up to date.'
* starting (LazyLibrarian): OK
-------------------- stop requested --------------------
= Mon Jan  6 10:17:01 GMT 2020
= (LazyLibrarian) is not active
-------------------- start requested --------------------
= Mon Jan  6 10:17:07 GMT 2020
= (LazyLibrarian) is not active
* updating (LazyLibrarian): OK
= result: 0
= PullGitRepo(): 'Fetching origin
HEAD is now at ba156875 Move toggles to right side for remaining pages
Already up to date.'
* starting (LazyLibrarian): OK
-------------------- stop requested --------------------
= Wed Jan 15 16:08:02 GMT 2020
= (LazyLibrarian) is not active
-------------------- start requested --------------------
= Wed Jan 15 16:08:08 GMT 2020
= (LazyLibrarian) is not active
* updating (LazyLibrarian): OK
= result: 0
= PullGitRepo(): 'Fetching origin
From https://gitlab.com/LazyLibrarian/LazyLibrarian
   ba156875..00ac0b71  master     -> origin/master
HEAD is now at 00ac0b71 Use global ratelimit for zlibrary
Already up to date.'
* starting (LazyLibrarian): OK

MHuijbregts
Getting the hang of things
Posts: 99
Joined: Mon May 04, 2009 12:53 am

Re: [SCRIPT] sherpa.sh

Post by MHuijbregts » Mon Jan 27, 2020 6:10 am

Hi OneCD,

Running TVS-EC880 & 4.4.1.1146

I was running the individual packages for NZBGet and SickChill but because of changes in both I bumped into some challenges. PostProcessing no longer working & no updates on the SickChill show lists anymore. So time to move on ;)

That's when I landed over here.

I first removed the default Python packages 2.7 & 3.8 as they were not accessed by any app and I don't require them for app development. Followed the instructions and ran the scripts for SickChill & NZBGet. The last one gave an error stating that port 6789 is already in use (which it is for JAVA). I tried to change this in the config.ini to the old value of the stand alone qpkg and restarted the app from the app center and that worked fine.

I took a similar approach for SickChill and changed the port value in the config.ini too. However, when I tried to open it in the app center it's going to the expected port value but nothing shows up. When checking for the port use using netstat it didn't show anything.

Do you know why SickChill would not start up?

Thanks in advance.
Cheers,


TVS EC880 / 8 x 6TB WD Red in Raid 6 / QTS 4.4.1.1146
Container Station / QSync / Unifi-Controller / Unifi-Video / Virtualization Station
TS-509 Pro / 4 x 2TB Seagate in Raid 5 / QTS 4.2.X (latest build)

User avatar
OneCD
Ask me anything
Posts: 6824
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Mon Jan 27, 2020 10:03 am

jkcchan wrote:
Mon Jan 27, 2020 2:34 am
NAS Model: TS-231P
Firmware: 4.4.1.1146
OK, both logs suggest the same behaviour - the app is launched, but is then unavailable. Your init logs indicate both apps are not recording the used UI ports after launch. :(

Let's focus on Watcher3 for now. Try launching it manually by running these 3 commands:

Code: Select all

export PYTHONPATH=/opt/bin/python3
cd $(/sbin/getcfg OWatcher3 Install_Path -f /etc/config/qpkg.conf)/OWatcher3
/opt/bin/python3 watcher3.py --userdata config --conf config/config.ini
This should launch Watcher3 in interactive-mode (if you close your terminal, Watcher3 will terminate). Please examine the launch messages. When it appears to have finished launching, use your browser to navigate to http://nasip:5070

Any problems reported on-screen? Please paste your launch messages back here.

edit: updated path
Last edited by OneCD on Mon Jan 27, 2020 11:13 am, edited 1 time in total.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
OneCD
Ask me anything
Posts: 6824
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Mon Jan 27, 2020 10:06 am

MHuijbregts wrote:
Mon Jan 27, 2020 6:10 am
Followed the instructions and ran the scripts for SickChill & NZBGet. The last one gave an error stating that port 6789 is already in use (which it is for JAVA). I tried to change this in the config.ini to the old value of the stand alone qpkg and restarted the app from the app center and that worked fine.
Good work. :geek:
MHuijbregts wrote:
Mon Jan 27, 2020 6:10 am
I took a similar approach for SickChill and changed the port value in the config.ini too. However, when I tried to open it in the app center it's going to the expected port value but nothing shows up. When checking for the port use using netstat it didn't show anything.

Do you know why SickChill would not start up?
Can you please post the SickChill init log?

Code: Select all

cat /var/log/SickChill.log

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jkcchan
Starting out
Posts: 11
Joined: Mon Dec 30, 2019 5:44 am

Re: [SCRIPT] sherpa.sh

Post by jkcchan » Mon Jan 27, 2020 1:54 pm

OneCD wrote:
Mon Jan 27, 2020 10:03 am
jkcchan wrote:
Mon Jan 27, 2020 2:34 am
NAS Model: TS-231P
Firmware: 4.4.1.1146
OK, both logs suggest the same behaviour - the app is launched, but is then unavailable. Your init logs indicate both apps are not recording the used UI ports after launch. :(

Let's focus on Watcher3 for now. Try launching it manually by running these 3 commands:

Code: Select all

export PYTHONPATH=/opt/bin/python3
cd $(/sbin/getcfg OWatcher3 Install_Path -f /etc/config/qpkg.conf)/OWatcher3
/opt/bin/python3 watcher3.py --userdata config --conf config/config.ini
This should launch Watcher3 in interactive-mode (if you close your terminal, Watcher3 will terminate). Please examine the launch messages. When it appears to have finished launching, use your browser to navigate to http://nasip:5070

Any problems reported on-screen? Please paste your launch messages back here.

edit: updated path
Thanks so much for this prompt reply. Just ran, output below

Code: Select all

[~] # export PYTHONPATH=/opt/bin/python3
[~] # cd $(/sbin/getcfg OWatcher3 Install_Path -f /etc/config/qpkg.conf)/OWatcher3
[/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3] # /opt/bin/python3 watcher3.py --userdata config --conf config/config.ini
/opt/bin/python3: can't open file 'watcher3.py': [Errno 2] No such file or directory
[/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3] #               

User avatar
OneCD
Ask me anything
Posts: 6824
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Mon Jan 27, 2020 2:06 pm

jkcchan wrote:
Mon Jan 27, 2020 1:54 pm

Code: Select all

[/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3] # /opt/bin/python3 watcher3.py --userdata config --conf config/config.ini
/opt/bin/python3: can't open file 'watcher3.py': [Errno 2] No such file or directory
Hmm, that's not right. Looks like the main Watcher3 script is missing :'

Can you please get a directory listing there?

Code: Select all

ll /share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

jkcchan
Starting out
Posts: 11
Joined: Mon Dec 30, 2019 5:44 am

Re: [SCRIPT] sherpa.sh

Post by jkcchan » Mon Jan 27, 2020 2:56 pm

Code: Select all

[/share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3] # ll /share/CACHEDEV1_DATA/.qpkg/OWatcher3/OWatcher3
drwxr-xr-x   16 admin    administ      4.0k Jan  1 16:08 ./
drwxr-xr-x    4 admin    administ      4.0k Jan 15 15:51 ../
drwxr-xr-x    8 admin    administ      4.0k Jan 15 16:08 .git/
drwxr-xr-x    3 admin    administ      4.0k Dec 29 15:45 .github/
-rw-rw-rw-    1 admin    administ       266 Jan  1 16:08 .gitignore
drwxr-xr-x    2 admin    administ      4.0k Dec 29 15:45 Docker/
-rw-r--r--    1 admin    administ       471 Dec 29 15:45 Dockerfile
-rw-r--r--    1 admin    administ       530 Dec 29 15:45 ISSUE_TEMPLATE.md
-rw-r--r--    1 admin    administ      6.1k Dec 29 15:45 README.md
-rw-r--r--    1 admin    administ      2.6k Dec 29 15:45 backup.py
drwxr-xr-x    5 admin    administ      4.0k Jan  2 18:20 core/
drwxr-xr-x   15 admin    administ      4.0k Dec 29 15:45 lib/
-rw-r--r--    1 admin    administ      9.5k Dec 29 15:45 license.txt
drwxr-xr-x    2 admin    administ      4.0k Dec 29 15:45 locale/
drwxr-xr-x    2 admin    administ      4.0k Jan 26 23:29 logs/
drwxr-xr-x    5 admin    administ      4.0k Dec 29 15:45 plugins/
drwxr-xr-x    2 admin    administ      4.0k Dec 29 15:45 post scripts/
drwxr-xr-x    3 admin    administ      4.0k Dec 29 15:45 run scripts/
drwxr-xr-x    7 admin    administ      4.0k Dec 29 15:45 static/
drwxr-xr-x    6 admin    administ      4.0k Jan 26 23:29 templates/
drwxr-xr-x    2 admin    administ      4.0k Dec 29 15:45 tests/
-rw-r--r--    1 admin    administ        22 Dec 29 15:45 tox.ini
drwxr-xr-x    2 admin    administ      4.0k Dec 29 15:45 userdata/
-rw-r--r--    1 admin    administ      7.6k Dec 29 15:45 watcher.py

Post Reply

Return to “Community Apps”