Page 1 of 2

"SAByenc not found" with SAB 3 [QNAP NAS]

Posted: May 22nd, 2020, 6:33 pm
by OneCD
Hi guys,

I'm getting a new package together for QNAP NAS users to try-out the new SABnzbd 3, and have currently resolved all dependencies - except one.

SABnzbd start correctly, but shows these errors in its UI log:

Code: Select all

Essential modules are missing, downloading cannot start.
SABYenc module... NOT found! Expecting v4.0.0 - https://sabnzbd.org/sabyenc
So, I confirmed that sabyenc 3 is installed:

Code: Select all

[~] # /opt/bin/python3 -m pip install sabyenc3
Requirement already satisfied: sabyenc3 in /share/MD0_DATA/.qpkg/Entware/lib/python3.8/site-packages (4.0.1)

Code: Select all

[~] # /opt/bin/pip3 list
Package            Version
------------------ -------
cffi               1.14.0 
chardet            3.0.4  
Cheetah3           3.2.5  
cheroot            8.3.0  
CherryPy           18.6.0 
configobj          5.0.6  
cryptography       2.8    
feedparser         5.2.1  
jaraco.classes     3.1.0  
jaraco.collections 3.0.0  
jaraco.functools   3.0.1  
jaraco.text        3.2.0  
more-itertools     8.3.0  
pip                19.2.3 
ply                3.11   
portend            2.6    
pycparser          2.19   
pyOpenSSL          19.1.0 
pytz               2020.1 
sabyenc3           4.0.1  
setuptools         46.4.0 
six                1.14.0 
tempora            3.0.0  
zc.lockfile        2.0    
... and attempted to test as per the wiki:

Code: Select all

[~] # /opt/bin/python -c "import sabyenc ; print sabyenc.__version__ "
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named sabyenc

Code: Select all

[~] # /opt/bin/python3 -c "import sabyenc ; print sabyenc.__version__ "
  File "<string>", line 1
    import sabyenc ; print sabyenc.__version__ 
                           ^
SyntaxError: invalid syntax

Code: Select all

[~] # /opt/bin/python3 -c "import sabyenc3 ; print sabyenc.__version__ "
  File "<string>", line 1
    import sabyenc3 ; print sabyenc.__version__ 
                            ^
SyntaxError: invalid syntax
My Python-fu isn't up to the task - can anyone see what I've done wrong here?

Thank you. :)

Re: "SAByenc not found" with SAB 3

Posted: May 23rd, 2020, 12:54 am
by OneCD
Ah, I forgot there's a difference when using 'print' between Py2 and Py3. ;D

(Also noticed that code tags on this forum do not format as monospaced, so the wrong character is highlighted as a syntax error in my previous posts).

So, looks like the correct command is:

Code: Select all

/opt/bin/python3 -c "import sabyenc3; print("sabyenc3.__version__") "
... which works on Debian 10.4:

Code: Select all

$ python3 -c "import sabyenc3; print("sabyenc3.__version__") "
4.0.1
... but not on QTS with Entware:

Code: Select all

[~] # /opt/bin/python3 -c "import sabyenc3; print("sabyenc3.__version__") "
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'sabyenc3'

Re: "SAByenc not found" with SAB 3

Posted: May 23rd, 2020, 1:01 am
by OneCD
Success!

Couldn't solve the CLI test problem, but I (eventually) noticed that SABnzbd was quite specific about which sabyenc3 version it was looking for. So I downgraded 'sabyenc3',

Code: Select all

pip3 install sabyenc3==4.0.0
... then restarted SABznzbd, and it's now picked up the 'sabyenc3' module:

Code: Select all

2020-05-23 15:59:08,663::INFO::[SABnzbd:1089] --------------------------------
2020-05-23 15:59:08,668::INFO::[SABnzbd:1090] SABnzbd.py-3.0.0-develop (rev=unknown)
2020-05-23 15:59:08,670::INFO::[SABnzbd:1091] Full executable path = /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py
2020-05-23 15:59:08,675::INFO::[SABnzbd:1101] Platform = posix
2020-05-23 15:59:08,678::INFO::[SABnzbd:1102] Python-version = 3.8.1 (default, Mar 23 2020, 07:23:17) 
[GCC 8.3.0]
2020-05-23 15:59:08,680::INFO::[SABnzbd:1103] Arguments = "SABnzbd.py" "--daemon" "--browser" "0" "--config-file" "/share/MD0_DATA/.qpkg/SABnzbd/config/config.ini" "--pidfile" "/tmp/SABnzbd.pid"
2020-05-23 15:59:08,682::INFO::[SABnzbd:1107] Not inside a docker container
2020-05-23 15:59:08,685::INFO::[SABnzbd:1110] Preferred encoding = UTF-8
2020-05-23 15:59:08,687::INFO::[SABnzbd:1117] SSL version = OpenSSL 1.1.1d  10 Sep 2019
2020-05-23 15:59:08,689::INFO::[SABnzbd:1164] Using INI file /share/MD0_DATA/.qpkg/SABnzbd/config/config.ini
2020-05-23 15:59:08,713::INFO::[postproc:135] Loading postproc queue
2020-05-23 15:59:08,721::INFO::[__init__:924] [N/A] /share/MD0_DATA/.qpkg/SABnzbd/config/<USERNAME>/Rating.sab missing
2020-05-23 15:59:08,726::INFO::[scheduler:207] Setting schedule for midnight BPS reset
2020-05-23 15:59:08,728::INFO::[__init__:343] All processes started
2020-05-23 15:59:08,730::INFO::[SABnzbd:275] Template location for Glitter is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Glitter
2020-05-23 15:59:08,733::INFO::[SABnzbd:275] Template location for Config is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Config
2020-05-23 15:59:08,808::INFO::[config:851] Writing settings to INI file /share/MD0_DATA/.qpkg/SABnzbd/config/config.ini
2020-05-23 15:59:08,901::INFO::[SABnzbd:376] SABYenc module (v4.0.0)... found!
2020-05-23 15:59:08,903::INFO::[SABnzbd:388] Cryptography module (v2.8)... found!
2020-05-23 15:59:08,905::INFO::[SABnzbd:391] par2 binary... found (/usr/bin/par2)
2020-05-23 15:59:08,906::INFO::[SABnzbd:403] UNRAR binary... found (/opt/bin/unrar)
2020-05-23 15:59:08,908::INFO::[SABnzbd:411] UNRAR binary version 5.90
2020-05-23 15:59:08,922::INFO::[SABnzbd:418] unzip binary... found (/usr/bin/unzip)
2020-05-23 15:59:08,924::INFO::[SABnzbd:423] 7za binary... found (/opt/bin/7za)
2020-05-23 15:59:08,925::INFO::[SABnzbd:429] nice binary... found (/opt/bin/nice)
2020-05-23 15:59:08,927::INFO::[SABnzbd:433] ionice binary... found (/opt/bin/ionice)
2020-05-23 15:59:08,939::INFO::[SABnzbd:1325] Starting web-interface on 0.0.0.0:8900
2020-05-23 15:59:08,941::INFO::[_cplogging:213] [23/May/2020:15:59:08] ENGINE Bus STARTING
2020-05-23 15:59:09,080::INFO::[_cplogging:213] [23/May/2020:15:59:09] ENGINE Serving on http://0.0.0.0:8900
2020-05-23 15:59:09,085::INFO::[_cplogging:213] [23/May/2020:15:59:09] ENGINE Bus STARTED
2020-05-23 15:59:09,088::INFO::[SABnzbd:1357] Starting SABnzbd.py-3.0.0-develop
2020-05-23 15:59:09,111::INFO::[dirscanner:370] Dirscanner starting up
2020-05-23 15:59:09,117::INFO::[postproc:225] Completed Download Folder /share/Download/complete is not on FAT
2020-05-23 15:59:09,118::INFO::[urlgrabber:83] URLGrabber starting up
2020-05-23 15:59:09,819::INFO::[zconfig:63] No Bonjour/ZeroConfig support installed
;D

Re: "SAByenc not found" with SAB 3

Posted: May 23rd, 2020, 1:04 am
by OneCD
BTW: I chose the 'develop' branch. Is this the correct branch to use?

Re: "SAByenc not found" with SAB 3

Posted: May 23rd, 2020, 3:57 am
by safihre
SABnzbd only checks the first 3 chars, so the 4.0.1 should also work! 4.0.1 is also a bit safer, so recommended.

Well, develop = development, so sometimes (like today) I made a boo-boo and things break.. But for now we don't have a master yet with Py3 version, so either develop, or use the specific Alpha/Beta/RC tags.

Re: "SAByenc not found" with SAB 3

Posted: June 20th, 2020, 10:57 pm
by OneCD
I've just tried this again but without the version-hold I had previously placed on 'sabyenc3', and it's still broken. ???

Current 'sabyenc3' is 4.0.2 but my SAB3 git cloned from 'develop' throws the same error about "missing module":

Code: Select all

2020-06-21 13:48:02,835::INFO::[SABnzbd:1139] SABnzbd.py-3.0.0-develop (rev=unknown)
2020-06-21 13:48:02,838::INFO::[SABnzbd:1140] Full executable path = /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py
...
2020-06-21 13:48:03,361::ERROR::[SABnzbd:405] SABYenc module... NOT found! Expecting v4.0.0 - https://sabnzbd.org/sabyenc
... until I force downgrade 'sabyenc3' again to 4.0.0:

Code: Select all

[~] # pip3 install sabyenc3==4.0.0
... then restart SAB3:

Code: Select all

2020-06-21 13:51:13,957::INFO::[SABnzbd:1139] SABnzbd.py-3.0.0-develop (rev=unknown)
2020-06-21 13:51:13,959::INFO::[SABnzbd:1140] Full executable path = /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py
...
2020-06-21 13:51:14,073::INFO::[SABnzbd:393] SABYenc module (v4.0.0)... found!

Re: "SAByenc not found" with SAB 3

Posted: June 20th, 2020, 11:19 pm
by OneCD
More info:

'sabyenc3' 4.0.2 works fine with SAB3 'develop' on my Debian 10.4 server. ???

One difference that may be relevant:
  • The working system uses Python 3.7.3
  • The broken one (in this topic) uses Python 3.8.3

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 12:46 am
by sander
What is the output of

Code: Select all

which python3
which pip3
for root and any other user you're using?

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 12:51 am
by OneCD
The problem unit is powered-off at the moment, but I’ll check when it’s next available.

But Python 3 is installed via Entware, so both should be in /opt/bin/

And in QTS, all apps run as root.

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 1:11 am
by sander
And:

Code: Select all

/opt/bin/python3 -c "import sabyenc3; print("sabyenc3.__version__") "
is not working for you. That is bad, and I'm quite sure you must solve that.

How about

Code: Select all

python3 -c "import sabyenc3; print("sabyenc3.__version__") "
I have the idea you have two (or more) python3 installs.

And how / with which python3 is SABnzbd.py started?

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 1:21 am
by OneCD
Thanks @sander, I'll get that info for you now. :)

In the mean-time, this unit only has a single Python 3 version installed (it's 3.8.3 at the moment).

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 1:32 am
by OneCD

Code: Select all

[~] # type -a pip3
pip3 is /opt/bin/pip3

Code: Select all

[~] # type -a python
python is /opt/bin/python
python is /usr/local/bin/python

Code: Select all

[~] # python -V
Python 3.8.3

Code: Select all

[~] # type -a python3
python3 is /opt/bin/python3

Code: Select all

[~] # python3 -V
Python 3.8.3

Code: Select all

[~] # pip3 list
Package            Version
------------------ -------
cffi               1.14.0 
chardet            3.0.4  
Cheetah3           3.2.5  
cheroot            8.3.0  
CherryPy           18.6.0 
configobj          5.0.6  
cryptography       2.9.2  
feedparser         5.2.1  
jaraco.classes     3.1.0  
jaraco.collections 3.0.0  
jaraco.functools   3.0.1  
jaraco.text        3.2.0  
more-itertools     8.4.0  
pip                19.2.3 
ply                3.11   
portend            2.6    
pycparser          2.20   
pyOpenSSL          19.1.0 
pytz               2020.1 
sabyenc3           4.0.0  
setuptools         41.2.0 
six                1.15.0 
tempora            3.0.0  
zc.lockfile        2.0    
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
OK, here's the problem unit with 'sabyenc3' fixed at 4.0.0

Code: Select all

2020-06-21 16:24:48,593::INFO::[SABnzbd:1138] --------------------------------
2020-06-21 16:24:48,606::INFO::[SABnzbd:1139] SABnzbd.py-3.0.0-develop (rev=unknown)
2020-06-21 16:24:48,609::INFO::[SABnzbd:1140] Full executable path = /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py
2020-06-21 16:24:48,614::INFO::[SABnzbd:1150] Platform = posix
2020-06-21 16:24:48,616::INFO::[SABnzbd:1151] Python-version = 3.8.3 (default, Jun 12 2020, 20:24:48) 
[GCC 8.4.0]
2020-06-21 16:24:48,618::INFO::[SABnzbd:1152] Arguments = "SABnzbd.py" "--daemon" "--browser" "0" "--config-file" "/share/MD0_DATA/.qpkg/SABnzbd/config/config.ini" "--pidfile" "/var/run/SABnzbd.pid"
2020-06-21 16:24:48,620::INFO::[SABnzbd:1156] Not inside a docker container
2020-06-21 16:24:48,622::INFO::[SABnzbd:1159] Preferred encoding = UTF-8
2020-06-21 16:24:48,624::INFO::[SABnzbd:1171] SSL version = OpenSSL 1.1.1g  21 Apr 2020
2020-06-21 16:24:48,626::INFO::[SABnzbd:1219] Using INI file /share/MD0_DATA/.qpkg/SABnzbd/config/config.ini
2020-06-21 16:24:48,667::INFO::[postproc:138] Loading postproc queue
2020-06-21 16:24:48,683::INFO::[__init__:949] [N/A] /share/MD0_DATA/.qpkg/SABnzbd/config/admin/Rating.sab missing
2020-06-21 16:24:48,688::INFO::[scheduler:216] Setting schedule for midnight BPS reset
2020-06-21 16:24:48,691::INFO::[__init__:344] All processes started
2020-06-21 16:24:48,702::INFO::[SABnzbd:292] Template location for Glitter is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Glitter
2020-06-21 16:24:48,707::INFO::[SABnzbd:292] Template location for Config is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Config
2020-06-21 16:24:48,839::INFO::[SABnzbd:393] SABYenc module (v4.0.0)... found!
2020-06-21 16:24:48,841::INFO::[SABnzbd:412] Cryptography module (v2.9.2)... found!
2020-06-21 16:24:48,843::INFO::[SABnzbd:415] par2 binary... found (/usr/bin/par2)
2020-06-21 16:24:48,845::INFO::[SABnzbd:427] UNRAR binary... found (/opt/bin/unrar)
2020-06-21 16:24:48,847::INFO::[SABnzbd:435] UNRAR binary version 5.90
2020-06-21 16:24:48,849::INFO::[SABnzbd:442] unzip binary... found (/usr/bin/unzip)
2020-06-21 16:24:48,851::INFO::[SABnzbd:447] 7za binary... found (/opt/bin/7za)
2020-06-21 16:24:48,853::INFO::[SABnzbd:453] nice binary... found (/opt/bin/nice)
2020-06-21 16:24:48,854::INFO::[SABnzbd:457] ionice binary... found (/opt/bin/ionice)
2020-06-21 16:24:48,868::INFO::[SABnzbd:1405] Starting web-interface on 0.0.0.0:8900
My current SysV init script can be viewed here: https://github.com/OneCDOnly/sherpa/blo ... abnzbd3.sh

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 1:36 am
by OneCD
This is interesting. I tried that one-liner shown earlier to check the 'sabyenc3' version, and it only works if 'sabyenc3' v4.0.0 is installed:

Code: Select all

[~] # /opt/bin/python3 -c "import sabyenc3; print("sabyenc3.__version__") "
4.0.0

Code: Select all

[~] # pip3 uninstall sabyenc3
Uninstalling sabyenc3-4.0.0:
  Would remove:
    /share/MD0_DATA/.qpkg/Entware/lib/python3.8/site-packages/sabyenc3-4.0.0-py3.8.egg-info
    /share/MD0_DATA/.qpkg/Entware/lib/python3.8/site-packages/sabyenc3.cpython-38.so
Proceed (y/n)? y
  Successfully uninstalled sabyenc3-4.0.0

Code: Select all

[~] # pip3 install sabyenc3
Collecting sabyenc3
  Downloading https://files.pythonhosted.org/packages/72/ea/d2de7895663bbe870fd74314ad513c4ff880b22df7739d29d58a4b4cb6dd/sabyenc3-4.0.2-cp38-cp38-manylinux1_x86_64.whl
Installing collected packages: sabyenc3
Successfully installed sabyenc3-4.0.2
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Code: Select all

[~] # /opt/bin/python3 -c "import sabyenc3; print("sabyenc3.__version__") "
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'sabyenc3'
[~] # 

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 1:39 am
by sander
What do you get with:

Code: Select all

/opt/bin/python3 -m pip install sabyenc3

Re: "SAByenc not found" with SAB 3 [QNAP NAS]

Posted: June 21st, 2020, 1:40 am
by OneCD

Code: Select all

[~] # /opt/bin/python3 -m pip install sabyenc3
Requirement already satisfied: sabyenc3 in /share/MD0_DATA/.qpkg/Entware/lib/python3.8/site-packages (4.0.2)
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.