[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
OneCD
Ask me anything
Posts: 6965
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sherpa.sh

Post by OneCD » Wed Nov 27, 2019 3:21 pm

Hey Ballador. :D
Ballador wrote:
Wed Nov 27, 2019 2:08 pm
I have been using CouchPotato and SickChill for almost a year, and SickChill just broke due to the changes over on TheTVDB. I know you have had some discussions on this,
Sorry, we haven't yet had a discussion here about the recent API changes @ TheTVDB. So, anything you've read in this topic relates to something else. ;)

#5686 was raised to deal with this, but as it's still open, I'm guessing the problem remains.

Ballador wrote:
Wed Nov 27, 2019 2:08 pm
Watcher3 on my system will not scan my Movies folder. I have attempted both my /share/movies and /share/CACHEDEV1_DATA/Movies paths (depending on the app, they chose one of these two paths), but both return a 500 Internal Server Error.
I'm not used the movie scanning feature, maybe else someone can assist with this?

You may need specialised help from the current devs: https://github.com/barbequesauce/Watcher3

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

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

Re: [SCRIPT] sherpa.sh

Post by OneCD » Sat Nov 30, 2019 11:48 am

OneCD wrote:
Wed Nov 27, 2019 3:21 pm
#5686 was raised to deal with this, but as it's still open, I'm guessing the problem remains.
#5686 is now closed. :D

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

peninsula
New here
Posts: 4
Joined: Wed Mar 15, 2017 12:24 am

Re: [SCRIPT] sherpa.sh

Post by peninsula » Wed Dec 11, 2019 8:10 am

TS251+, QTS 4.4.1.1146

I am having errors returned when attempting to run ./sherpa.sh --check. As I result, any attempt to install LazyLibrarian fails.

This is the error message I get:

[/share/Public] # cat /share/Public/sherpa.tmp/PIP-modules.install.log
Requirement already up-to-date: pip in /share/CACHEDEV1_DATA/.qpkg/Entware/lib/python3.7/site-packages (19.3.1)
Requirement already up-to-date: setuptools in /share/CACHEDEV1_DATA/.qpkg/Entware/lib/python3.7/site-packages (42.0.2)
Collecting sabyenc==3.3.5
Downloading https://files.pythonhosted.org/packages ... 3.5.tar.gz
Collecting cheetah
Downloading https://files.pythonhosted.org/packages ... 4.4.tar.gz (190kB)
ERROR: Command errored out with exit status 1:
command: /opt/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/share/CACHEDEV1_DATA/.qpkg/Entware/tmp/pip-install-db0tswfs/cheetah/setup.py'"'"'; __file__='"'"'/share/CACHEDEV1_DATA/.qpkg/Entware/tmp/pip-install-db0tswfs/cheetah/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /share/CACHEDEV1_DATA/.qpkg/Entware/tmp/pip-install-db0tswfs/cheetah/pip-egg-info
cwd: /share/CACHEDEV1_DATA/.qpkg/Entware/tmp/pip-install-db0tswfs/cheetah/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/share/CACHEDEV1_DATA/.qpkg/Entware/tmp/pip-install-db0tswfs/cheetah/setup.py", line 10, in <module>
import SetupTools
File "/share/CACHEDEV1_DATA/.qpkg/Entware/tmp/pip-install-db0tswfs/cheetah/SetupTools.py", line 50
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
result=[1]

Is anyone else seeing the same issue and do you have ideas what I could try to overcome this?

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

Re: [SCRIPT] sherpa.sh

Post by OneCD » Wed Dec 11, 2019 8:27 am

Hi and welcome to the forum. :)
peninsula wrote:
Wed Dec 11, 2019 8:10 am
TS251+, QTS 4.4.1.1146

I am having errors returned when attempting to run ./sherpa.sh --check. As I result, any attempt to install LazyLibrarian fails.
Can you please try reinstalling Entware? This command will do it for you and reinstall all required components:

Code: Select all

./sherpa.sh Entware

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

starnap
New here
Posts: 3
Joined: Sat Sep 16, 2017 5:07 pm

Re: [SCRIPT] sherpa.sh

Post by starnap » Sat Dec 14, 2019 6:39 pm

Hi OneCD

Been using the script for a while now but started having a strange issue with my setup on a reboot yesterday.

model: TS-453A
firmware version: 4.4.1
firmware build: 20191206

This issue was also present on firmware build: 20191025 as I updated yesterday to see if the issue when away, unfortunately it didn't.

I use full disk encryption on the NAS, when it boots up the storage is locked until I manually go in and input the decryption key, the drives would then decrypt and the programs would all start no problems (takes about 5 mins)

Upon reboot now the encryption gets to 66% and then halts for ages, I then receive 3 email alerts about 2 mins apart, that each program I have installed (Sab,sick,couch) all failed to start

Code: Select all

Message: [sickchill.sh] can't continue: Entware not found! (timeout)
The decryption eventually gets to 100% after these error messages have come in.

I then go to /share/Public and run the script with either -update or each program and they all start with no problem and run as before...

Any pointers here? Seems like the script is being decrypted & run before the entware data and failing maybe? Perhaps a delay needs to be added or I need to install your https://qnapclub.eu/en/qpkg/508 program?

Code: Select all

[ dbug ] (II) ========================================================================
[ dbug ] (**) SCRIPT:             started: Fri Dec 13 10:49:52 GMT 2019
[ dbug ] (**) SCRIPT:             version: 191106
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (II) Markers: (**) detected, (II) information, (WW) warning, (LL) log file,
[ dbug ] (II)  (EE) error, (==) processing, (--) done, (>>) f entry, (<<) f exit,
[ dbug ] (II)  (vv) variable name & value, ($1) positional argument value.
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (**) NAS   :               model: TS-453A, QNAP Systems, Inc.
[ dbug ] (**) NAS   :    firmware version: 4.4.1
[ dbug ] (**) NAS   :      firmware build: 20191206
[ dbug ] (**) NAS   :              kernel: 4.14.24-qnap x86_64
[ dbug ] (**) NAS   :           OS uptime: 29 min
[ dbug ] (**) NAS   :         system load: 1 min=2.80, 5 min=2.70, 15 min=2.05
[ dbug ] (**) NAS   :                EUID: 0
[ dbug ] (**) NAS   :      default volume: /share/CE_CACHEDEV1_DATA
[ dbug ] (**) NAS   :               $PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:
[ dbug ] (**) NAS   :                /opt: /share/CE_CACHEDEV1_DATA/.qpkg/Entware
[ dbug ] (**) NAS   :     /share/Download: CE_CACHEDEV1_DATA/Download
[ dbug ] (**) SCRIPT:      user arguments: --update
[ dbug ] (**) SCRIPT:       target app(s)
[ dbug ] (**) SCRIPT:        working path: /share/Public/sherpa.tmp
[ dbug ] (**) QPKG  :       download path: /share/Public/sherpa.tmp/qpkg-downloads
[ dbug ] (**) IPKG  :       download path: /share/Public/sherpa.tmp/ipkg-downloads
[ dbug ] (**) QPKG  :                arch: x64
[ dbug ] (**) QPKG  :   Entware installer: std
[ proc ] testing Internet access ...
[ done ] Internet is accessible
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (<<) <EnvironCheck> [0]
[ dbug ] (>>) <DownloadQPKGs>
[ dbug ] (<<) <DownloadQPKGs> [0]
[ dbug ] (>>) <RemoveUnwantedQPKGs>
[ dbug ] (**) QPKG  :           'Optware': not installed [250]
[ dbug ] (**) QPKG  :        'Entware-3x': not installed [250]
[ dbug ] (**) QPKG  :        'Entware-ng': not installed [250]
[ dbug ] (<<) <RemoveUnwantedQPKGs> [0]
[ dbug ] (>>) <InstallBase>
[ dbug ] (--) adjusted $PATH
[ dbug ] (vv) $PATH [/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin]
[ dbug ] (>>) <PatchBaseInit>
[ dbug ] (II) patch: do the "opt shuffle" - already done
[ dbug ] (<<) <PatchBaseInit> [0]
[ dbug ] (<<) <InstallBase> [0]
[ dbug ] (>>) <InstallBaseAddons>
[ dbug ] (>>) <InstallIPKGs>
[ dbug ] (>>) <UpdateEntware>
[ proc ] updating Entware package list ...
[ done ] updated Entware package list
[ dbug ] (<<) <UpdateEntware> [0]
[ dbug ] (>>) <InstallIPKGBatch>
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (**) STAGE :   start stage timer
[ proc ] calculating number and total size of IPKGs required ...
[ dbug ] (II) requested IPKGs: ca-certificates coreutils-nice ffprobe gcc git git-http ionice less nano p7zip python python-dev python-pip python-pyopenssl python3-pip unrar
[ dbug ] (==) finding all IPKG dependencies ...
[ dbug ] (--) complete
[ dbug ] (II) found all IPKG dependencies in 12 iterations
[ dbug ] (==) excluding packages already installed ...
[ dbug ] (--) complete
[ dbug ] (II) IPKGs to download:
[ dbug ] (vv) $IPKG_download_size [0]
[ dbug ] (**) STAGE :        elapsed time: 00h:00m:02s
[ dbug ] (II) ------------------------------------------------------------------------
[ done ] no IPKGs are required
[ dbug ] (<<) <InstallIPKGBatch> [0]
[ dbug ] (<<) <InstallIPKGs> [0]
[ dbug ] (>>) <InstallPIPs>
[ proc ] downloading & installing PIP modules ...
[ done ] downloaded & installed PIP modules
[ dbug ] (<<) <InstallPIPs> [0]
[ dbug ] (>>) <RestartAllQPKGs>
[ proc ] restarting service 'Entware' ...
[ done ] restarted service 'Entware'
[ proc ] restarting service 'SABnzbdplus' ...
[ done ] restarted service 'SABnzbdplus'
[ proc ] restarting service 'SickChill' ...
[ done ] restarted service 'SickChill'
[ dbug ] (<<) <RestartAllQPKGs> [0]
[ dbug ] (<<) <InstallBaseAddons> [0]
[ dbug ] (>>) <Cleanup>
[ dbug ] (<<) <Cleanup> [0]
[ dbug ] (>>) <DisplayResult>
[ dbug ] (II) ------------------------------------------------------------------------
[ dbug ] (**) SCRIPT:            finished: Fri Dec 13 10:50:44 GMT 2019
[ dbug ] (**) SCRIPT:        elapsed time: 00h:00m:52s
[ dbug ] (II) ========================================================================

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

Re: [SCRIPT] sherpa.sh

Post by OneCD » Sun Dec 15, 2019 2:25 am

Hey @starnap. :D
starnap wrote:
Sat Dec 14, 2019 6:39 pm
Upon reboot now the encryption gets to 66% and then halts for ages, I then receive 3 email alerts about 2 mins apart, that each program I have installed (Sab,sick,couch) all failed to start

Code: Select all

Message: [sickchill.sh] can't continue: Entware not found! (timeout)
The decryption eventually gets to 100% after these error messages have come in.
I thought QTS waited for encrypted volumes to be decrypted before attempting to reintegrate installed QPKGs, as it doesn't make much sense to do things otherwise. Maybe QNAP have changed something there? :S

Each sherpa QPKG is coded to wait for upto 10 minutes for Entware to appear, then quit (which is what is happening on your NAS). I could extend this time, but this would mean releasing a whole new set of packages.
starnap wrote:
Sat Dec 14, 2019 6:39 pm
Any pointers here? Seems like the script is being decrypted & run before the entware data and failing maybe? Perhaps a delay needs to be added or I need to install your https://qnapclub.eu/en/qpkg/508 program?
Yes, using SortMyQPKGs is advised, but I'm unsure if it will fix the problem. Try it and see. :geek:

If it doesn't work, then we can try the RunLast QPKG. We can create a script launched by RunLast that keeps checking for Entware (beyond the standard 10 minutes in each QPKG). When it sees Entware, it cycles though each sherpa QPKG and 'start's them for you.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

starnap
New here
Posts: 3
Joined: Sat Sep 16, 2017 5:07 pm

Re: [SCRIPT] sherpa.sh

Post by starnap » Sun Dec 15, 2019 8:01 pm

OneCD wrote:
Sun Dec 15, 2019 2:25 am
I thought QTS waited for encrypted volumes to be decrypted before attempting to reintegrate installed QPKGs, as it doesn't make much sense to do things otherwise. Maybe QNAP have changed something there? :S
Each sherpa QPKG is coded to wait for upto 10 minutes for Entware to appear, then quit (which is what is happening on your NAS). I could extend this time, but this would mean releasing a whole new set of packages.
I defo wouldn't increase that 10 minutes time, I rechecked and yes, that's how long its taking between emails!
OneCD wrote:
Sun Dec 15, 2019 2:25 am
Yes, using SortMyQPKGs is advised, but I'm unsure if it will fix the problem. Try it and see. :geek:
Well I can report, 100% success! After installing and rebooting this application, all working again as normal.

Thank you very much for the reply, this issue also forced me to ditch Couch as I see it will stop working soon and Switch to Watcher3 which seems very nice.

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

Re: [SCRIPT] sherpa.sh

Post by OneCD » Mon Dec 16, 2019 3:12 am

starnap wrote:
Sun Dec 15, 2019 8:01 pm
Well I can report, 100% success! After installing and rebooting this application, all working again as normal.
Good work. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

mobilcontrol
New here
Posts: 4
Joined: Wed Dec 18, 2019 10:15 am

Re: [SCRIPT] sherpa.sh

Post by mobilcontrol » Wed Dec 18, 2019 10:16 am

Hi how do I remove this? I ran it once but would like to remove it entirely as I'm going another direction.
Thanks,

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

Re: [SCRIPT] sherpa.sh

Post by OneCD » Wed Dec 18, 2019 10:23 am

mobilcontrol wrote:
Wed Dec 18, 2019 10:16 am
Hi how do I remove this? I ran it once but would like to remove it entirely as I'm going another direction.
It's just a script. Delete it like any other file.

If any QPKGs have been installed, uninstall them via your QTS App Center.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

mobilcontrol
New here
Posts: 4
Joined: Wed Dec 18, 2019 10:15 am

Re: [SCRIPT] sherpa.sh

Post by mobilcontrol » Wed Dec 18, 2019 10:25 am

Thanks sorry I needed to be more specific how do I remove Entware if I don't see it in app center? Thank you!

mobilcontrol
New here
Posts: 4
Joined: Wed Dec 18, 2019 10:15 am

Re: [SCRIPT] sherpa.sh

Post by mobilcontrol » Wed Dec 18, 2019 10:26 am

Oh nevermind long day its right there in front of my nose!

Arrikhan
Starting out
Posts: 25
Joined: Thu Nov 12, 2009 7:52 pm

Re: [SCRIPT] sherpa.sh

Post by Arrikhan » Mon Dec 30, 2019 9:25 pm

Has CP been removed from Sherpa? Have I lost my marbles?

Arrikhan

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

Re: [SCRIPT] sherpa.sh

Post by OneCD » Tue Dec 31, 2019 3:15 am

Arrikhan wrote:
Mon Dec 30, 2019 9:25 pm
Has CP been removed from Sherpa? Have I lost my marbles?
Yes. No. ;)

Removed as it seems no-one is developing it anymore. So CP's ability to function is declining as the world around it is changing.

Watcher3 is a good alternative.

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 » 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):

Post Reply

Return to “Community Apps”