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

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander »

And you run SABnzbd.py also with /opt/bin/python3, as root? So

Code: Select all

# /opt/bin/python3 ... SABnzbd.py 
Or as another user? Or with a different python3 / no python3 specified?
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

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

Post by OneCD »

Yes, only as root (well, in QTS 'admin' is the root user):

Code: Select all

[~] # whoami
admin
[~] # echo $UID
0
[~] # echo $EUID
0
And only by explicitly specifying /opt/bin/python3
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander »

My guess is still that you're mixing python installs.

So: can you use

Code: Select all

/opt/bin/python3 
/opt/bin/python3 -m pip
(do not use python, python3, pip, pip3 as plain commands without path)

in your commands, and repeat the commands:

Code: Select all

/opt/bin/python3 -m pip install --upgrade --force-reinstall sabyenc3

/opt/bin/python3 -c 'import sabyenc3; print(sabyenc3.__version__) '

/opt/bin/python3 SABnzbd.py
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

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

Post by safihre »

The difference seems to be that for 4.0.2 it's using the manylinux1 package from Pypi, while for 4.0.0 it seems to compile the package on the NAS.
Does the NAS have a compiler? Is the NAS a x86 model?
There could be something wrong with the manylinux1 package!
What if you install sabyenc via pip but with the --no-binary flag? This forces pip to compile the package from sources.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

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

Post by OneCD »

sander wrote: June 21st, 2020, 3:23 am My guess is still that you're mixing python installs.
There's only a single Python3 install on the NAS.

It does contain an old Python 2.7.5 as this is embedded in the OS:

Code: Select all

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

Code: Select all

[~] # /usr/local/bin/python -V
Python 2.7.5
If you can think of a way to convince you there's only one Python3, I'd be happy to help. ;)
sander wrote: June 21st, 2020, 3:23 am So: can you use

Code: Select all

/opt/bin/python3 
/opt/bin/python3 -m pip
(do not use python, python3, pip, pip3 as plain commands without path)

in your commands, and repeat the commands:

Code: Select all

/opt/bin/python3 -m pip install --upgrade --force-reinstall sabyenc3

/opt/bin/python3 -c 'import sabyenc3; print(sabyenc3.__version__) '

/opt/bin/python3 SABnzbd.py
OK, here goes:

Code: Select all

[~] # /opt/bin/python3 -m pip install --upgrade --force-reinstall 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
  Found existing installation: sabyenc3 4.0.0
    Uninstalling sabyenc3-4.0.0:
      Successfully uninstalled sabyenc3-4.0.0
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'

Code: Select all

[~] # cd /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/
[/share/MD0_DATA/.qpkg/SABnzbd/SABnzbd] # /opt/bin/python3 SABnzbd.py 
2020-06-22 04:52:04,499::INFO::[SABnzbd:1138] --------------------------------
2020-06-22 04:52:04,500::INFO::[SABnzbd:1139] SABnzbd.py-3.0.0-develop (rev=unknown)
2020-06-22 04:52:04,501::INFO::[SABnzbd:1140] Full executable path = /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py
2020-06-22 04:52:04,503::INFO::[SABnzbd:1150] Platform = posix
2020-06-22 04:52:04,504::INFO::[SABnzbd:1151] Python-version = 3.8.3 (default, Jun 12 2020, 20:24:48) 
[GCC 8.4.0]
2020-06-22 04:52:04,505::INFO::[SABnzbd:1152] Arguments = "SABnzbd.py"
2020-06-22 04:52:04,506::INFO::[SABnzbd:1156] Not inside a docker container
2020-06-22 04:52:04,507::INFO::[SABnzbd:1159] Preferred encoding = UTF-8
2020-06-22 04:52:04,508::INFO::[SABnzbd:1171] SSL version = OpenSSL 1.1.1g  21 Apr 2020
2020-06-22 04:52:04,510::INFO::[SABnzbd:1219] Using INI file /root/.sabnzbd/sabnzbd.ini
2020-06-22 04:52:04,511::INFO::[filesystem:305] download_dir directory: /root/Downloads/incomplete does not exist, try to create it
2020-06-22 04:52:04,512::INFO::[filesystem:564] Creating directories: /root/Downloads/incomplete (mask=448)
2020-06-22 04:52:04,540::INFO::[config:857] Writing settings to INI file /root/.sabnzbd/sabnzbd.ini
2020-06-22 04:52:04,565::INFO::[__init__:949] [N/A] /root/.sabnzbd/admin/rss_data.sab missing
2020-06-22 04:52:04,566::INFO::[__init__:949] [N/A] /root/.sabnzbd/admin/totals10.sab missing
2020-06-22 04:52:04,574::INFO::[postproc:138] Loading postproc queue
2020-06-22 04:52:04,576::INFO::[__init__:949] [N/A] /root/.sabnzbd/admin/postproc2.sab missing
2020-06-22 04:52:04,578::INFO::[__init__:949] [N/A] /root/.sabnzbd/admin/queue10.sab missing
2020-06-22 04:52:04,579::INFO::[__init__:949] [N/A] /root/.sabnzbd/admin/watched_data2.sab missing
2020-06-22 04:52:04,581::INFO::[__init__:949] [N/A] /root/.sabnzbd/admin/Rating.sab missing
2020-06-22 04:52:04,584::INFO::[scheduler:216] Setting schedule for midnight BPS reset
2020-06-22 04:52:04,604::INFO::[config:857] Writing settings to INI file /root/.sabnzbd/sabnzbd.ini
2020-06-22 04:52:04,628::INFO::[__init__:344] All processes started
2020-06-22 04:52:04,630::INFO::[SABnzbd:292] Template location for Glitter is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Glitter
2020-06-22 04:52:04,631::INFO::[SABnzbd:292] Template location for Config is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Config
2020-06-22 04:52:04,657::ERROR::[SABnzbd:405] SABYenc module... NOT found! Expecting v4.0.0 - https://sabnzbd.org/sabyenc
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

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

Post by OneCD »

safihre wrote: June 21st, 2020, 3:31 am The difference seems to be that for 4.0.2 it's using the manylinux1 package from Pypi, while for 4.0.0 it seems to compile the package on the NAS.
Yup, I saw that too, but I'm not experienced enough with Python to understand the significance. ???
safihre wrote: June 21st, 2020, 3:31 am Does the NAS have a compiler?
No. Historically, compiling anything on QNAPs has been problematic, depending on the exact compiling attempted (due to lack of available headers, dev modules, etc... ). It usually has to be done in a PC.
safihre wrote: June 21st, 2020, 3:31 am Is the NAS a x86 model?
Yes:

Code: Select all

[~] # uname -m
x86_64
safihre wrote: June 21st, 2020, 3:31 am There could be something wrong with the manylinux1 package!
What if you install sabyenc via pip but with the --no-binary flag? This forces pip to compile the package from sources.
I had to experiment a bit to find the right command as it kept installing the cached version. I found some syntax in this post which seemed to work:

Code: Select all

[~] # pip3 install --force-reinstall --ignore-installed --no-binary :all: sabyenc3
Collecting sabyenc3
  Downloading https://files.pythonhosted.org/packages/66/4c/a8bc62273142b31de0e86b6312c81f30531785b5d72e9b6be595c9f632d4/sabyenc3-4.0.2.tar.gz
Installing collected packages: sabyenc3
  Running setup.py install for sabyenc3 ... done
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.
I'm not certain that it's been recompiled, but it does now run setup.py

Then, I launched a vanilla SAB:

Code: Select all

[~] # cd /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/
[/share/MD0_DATA/.qpkg/SABnzbd/SABnzbd] # /opt/bin/python3 SABnzbd.py 
2020-06-22 05:05:44,672::INFO::[SABnzbd:1138] --------------------------------
2020-06-22 05:05:44,673::INFO::[SABnzbd:1139] SABnzbd.py-3.0.0-develop (rev=unknown)
2020-06-22 05:05:44,674::INFO::[SABnzbd:1140] Full executable path = /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/SABnzbd.py
2020-06-22 05:05:44,676::INFO::[SABnzbd:1150] Platform = posix
2020-06-22 05:05:44,677::INFO::[SABnzbd:1151] Python-version = 3.8.3 (default, Jun 12 2020, 20:24:48) 
[GCC 8.4.0]
2020-06-22 05:05:44,678::INFO::[SABnzbd:1152] Arguments = "SABnzbd.py"
2020-06-22 05:05:44,679::INFO::[SABnzbd:1156] Not inside a docker container
2020-06-22 05:05:44,681::INFO::[SABnzbd:1159] Preferred encoding = UTF-8
2020-06-22 05:05:44,682::INFO::[SABnzbd:1171] SSL version = OpenSSL 1.1.1g  21 Apr 2020
2020-06-22 05:05:44,683::INFO::[SABnzbd:1219] Using INI file /root/.sabnzbd/sabnzbd.ini
2020-06-22 05:05:44,693::INFO::[postproc:138] Loading postproc queue
2020-06-22 05:05:44,698::INFO::[__init__:949] [N/A] /root/.sabnzbd/admin/Rating.sab missing
2020-06-22 05:05:44,701::INFO::[scheduler:216] Setting schedule for midnight BPS reset
2020-06-22 05:05:44,721::INFO::[config:857] Writing settings to INI file /root/.sabnzbd/sabnzbd.ini
2020-06-22 05:05:44,745::INFO::[__init__:344] All processes started
2020-06-22 05:05:44,747::INFO::[SABnzbd:292] Template location for Glitter is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Glitter
2020-06-22 05:05:44,749::INFO::[SABnzbd:292] Template location for Config is /share/MD0_DATA/.qpkg/SABnzbd/SABnzbd/interfaces/Config
2020-06-22 05:05:44,776::INFO::[SABnzbd:393] SABYenc module (v4.0.2)... found!
Success! ;D

Thanks @sander and @safihre. Good work guys!
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander »

So "python3 -m pip install --force-reinstall --ignore-installed --no-binary :all: sabyenc3" was the trick ... Wow ...

Great it works now.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

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

Post by safihre »

Well, not great for me, it means something is wrong with the manylinux1 package.. But how to test what the problem is..
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

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

Post by OneCD »

safihre wrote: June 21st, 2020, 3:52 pm Well, not great for me, it means something is wrong with the manylinux1 package.. But how to test what the problem is..
Ah. :-\

Anything I can do to help?
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

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

Post by sander »

FWIW: I just installed sabyenc3 4.0.2 on my ARM, and that worked, but ... via self-compiling. Is that relevant info?
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

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

Post by safihre »

@sander, no ;)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

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

Post by safihre »

It's very strange though, for our automated-tests we also use the manylinux1 package and it works just fine:
https://travis-ci.com/github/sabnzbd/sa ... 74184#L276 (it's in the pip install -r requirements.txt section)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

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

Post by OneCD »

That's all way over-my-head. But please advise if you need me to do any environment testing on my NAS.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
frollic
Newbie
Newbie
Posts: 6
Joined: June 14th, 2012, 4:29 am

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

Post by frollic »

I ran into this issue on a newly upgraded fc33 (from fc32 python3 3.8.6).

Seems there's some kind of bug in python3-3.9.0 (at least the Fedora version) , worked again in 3.9.1.
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

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

Post by OneCD »

Hey guys. :)

If I may revive this one again (as it's still happening). I've been reinstalling the 'sabyenc3' PyPI module so SABnzbd will see it, but I'm now seeing a couple of deprecation warnings when doing-so. Maybe we can revisit this?
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
DEPRECATION: sabyenc3 is being installed using the legacy 'setup.py install' method, because the '--no-binary' option was enabled for it and this currently disables local wheel building for projects that don't have a 'pyproject.toml' file. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/11451
When installed the regular way via 'pip install', it seems to go OK (shown below are just the parts related to 'sabyenc3'):

Code: Select all

...
Collecting sabyenc3==5.4.4
  Downloading sabyenc3-5.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (148 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.3/148.3 kB 1.5 MB/s eta 0:00:00
...
Installing collected packages: ... sabyenc3 ...
Successfully installed ... sabyenc3-5.4.4 ...
And it shows in the module list:

Code: Select all

(venv) [/share/CACHEDEV1_DATA/.qpkg/SABnzbd] # pip list
Package            Version
------------------ -----------
sabyenc3           5.4.4
However, SABnzbd can't see the module:

Code: Select all

2022-12-03 14:35:18,913::ERROR::[SABnzbd:436] SABYenc module... NOT found! Expecting v5.4.4 - https://sabnzbd.org/sabyenc
... unless I force reinstall the module as I've been doing since we last discussed it in this topic.

Here's the original test we performed when last checking for 'sabyenc3' with the current result:

Code: Select all

(venv) [/share/CACHEDEV1_DATA/.qpkg/SABnzbd] # python3 -c "import sabyenc3; print(sabyenc.__version__ )"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'sabyenc3'
Any thoughts? Cheers!
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Post Reply