clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
673 stars 176 forks source link

Issue with post-processing scripts - on Sabnzbd+ versions 3.7.0.0 - 3.7.2.0 #1967

Closed rav3ndk closed 1 year ago

rav3ndk commented 1 year ago

Describe the bug _lib.X509_V_FLAG_CB_ISSUER_CHECK occurs when sabnzbd+ calls post-processing scripts from nzbtomedia. This error started happening since upgrading sabnzbd+ to version 3.7.0.0. Initially I created support ticket with QNAP_Stephane as I was certain the problem was with the sabnzbd+ package. After testing 3 versions of sabnzbd+ he now asked me to create ticket here. Post in Discord for MyQNAP.org: https://discord.com/channels/1037035252792709130/1037061958689640548/threads/1062399014173147147

Technical Specs

  1. Running on (QNAP TVS-873 firmware 5.0.1)
  2. Python version = 2.7 on QNAP but I believe sabnzbd has 3.7 built into package
  3. Download Client = SABnbzd
  4. Intended Media Management = CouchPotoato

Expected behavior Expected sabnzbd+ to execute post-processing scripts and files be cleaned and moved to target directory. This doesn't happen and files now stay in download directory.

Log Traceback (most recent call last): File "/share/VIDEOS/Download/nzbToMedia/nzbToCouchPotato.py", line 269, in import nzbToMedia File "/share/CACHEDEV2_DATA/VIDEOS/Download/nzbToMedia/nzbToMedia.py", line 730, in import core File "/share/CACHEDEV2_DATA/VIDEOS/Download/nzbToMedia/core/init.py", line 52, in from core import logger, main_db, version_check, databases, transcoder File "/share/CACHEDEV2_DATA/VIDEOS/Download/nzbToMedia/core/version_check.py", line 25, in from core import github_api as github, logger File "/share/CACHEDEV2_DATA/VIDEOS/Download/nzbToMedia/core/github_api.py", line 10, in import requests File "/share/CACHEDEV2_DATA/VIDEOS/Download/nzbToMedia/libs/common/requests/init.py", line 95, in from urllib3.contrib import pyopenssl File "/share/CACHEDEV2_DATA/VIDEOS/Download/nzbToMedia/libs/common/urllib3/contrib/pyopenssl.py", line 46, in import OpenSSL.SSL File "/share/CACHEDEV1_DATA/.qpkg/QSabNZBd3/lib/python3.7/site-packages/OpenSSL/init.py", line 8, in from OpenSSL import crypto, SSL File "/share/CACHEDEV1_DATA/.qpkg/QSabNZBd3/lib/python3.7/site-packages/OpenSSL/crypto.py", line 1517, in class X509StoreFlags(object): File "/share/CACHEDEV1_DATA/.qpkg/QSabNZBd3/lib/python3.7/site-packages/OpenSSL/crypto.py", line 1537, in X509StoreFlags CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

clinton-hall commented 1 year ago

well I can't access the discord...

It looks to me like the python packaged with the Sabnzbd package is broken (or at least the OpenSSL crypto package is.

Does this python have pip intalled? you should be able to update pyopenssl /share/CACHEDEV1_DATA/.qpkg/QSabNZBd3/bin/python -m pip install pyopenssl --upgrade

rav3ndk commented 1 year ago

@clinton-hall - Thanks for the suggestion - this solved my issue.

From QSabNZBd3/bin folder I executed ./python3 -m pip install pyopenssl --upgrade. This upgraded the pyOpenSSL to 23.1.1 and now post-processing works

During this I also found that I was using 12.1.05 version of nzbToMedia. As part of my troubleshooting, I also tried upgrading this to latest 12.1.10 - but this resulted in other errors. I will create a new issue on this.