clinton-hall / nzbToMedia

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

"ModuleNotFoundError: No module named '_sqlite3'" #1748

Closed silentpiranha closed 4 years ago

silentpiranha commented 4 years ago

Describe the bug nzbtosickbear.py nzbtomedia.py

throwing exeption "ModuleNotFoundError: No module named '_sqlite3'"

Technical Specs

  1. Running FreeNas 11.3 iocage Jail
  2. Python version '3.7_3,2'
  3. Download Client SABnbzd
  4. Intended Media Management SickChill

Log from SABnbzd UI

Changing to directory: /usr/local/share/nzbToMedia

-- Cleaning bytecode --
WARNING: Automatic cleanup could not be executed.
If errors occur, manual cleanup may be required.
REASON : Error: [Errno 2] No such file or directory: 'git': 'git'

-- Cleaning folders: ['libs', 'core'] --
WARNING: Automatic cleanup could not be executed.
If errors occur, manual cleanup may be required.
REASON : Error: [Errno 2] No such file or directory: 'git': 'git'
Returning to directory:  /usr/local/share/sabnzbdplus

-- Cleanup finished --

Traceback (most recent call last):
File "/usr/local/share/nzbToMedia/nzbToMedia.py", line 730, in <module>
import core
File "/usr/local/share/nzbToMedia/core/__init__.py", line 52, in <module>
from core import logger, main_db, version_check, databases, transcoder
File "/usr/local/share/nzbToMedia/core/main_db.py", line 11, in <module>
import sqlite3
File "/usr/local/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

no logfile in /nzbtomedia/logs

clinton-hall commented 4 years ago

this looks like your python build is missing sqlite3. Is there an updated python build available for your NAS? or even an older version?

silentpiranha commented 4 years ago

While searching for a newer version I stumpled on a seperate package containing sqlite3. Running Python 3.8 now symlinked to /usr/local/bin/python Had to clean up the script folder after this because of some different errors.

But now its running just fine. Thanks for tipping me in the right direction. Maybe I was to tired yesterdeay to figure it out myself.

clinton-hall commented 4 years ago

glad you found a working option. 3rd party Apps on NAS can be an issue. All it takes is one missing library on the build and other dependent Apps/projects come to a grinding halt. On a regular Linux box you could just build the lib etc, but on a NAS you are usually relying on someone else to have cross-compiled a fix, or created another version of the App (usually requires cross compiling)!