Sickchill: Database restore after wipe of Py2.7 and install of Py3.x version

Created on 22 Sep 2020  路  17Comments  路  Source: SickChill/SickChill

Before submitting your issue:

Enable debug logging in SickChill settings, reproduce the error (be sure to disable after the bug is fixed)

Branch/Commit: 6ae2bf5521339d10c481a90e96e3fc29ff29f1df
OS: QNap (via sherpa install)
Browser: Chrome/OSX/latest
What you did:

  • Backed up settings from my "recent" Py2.7 compatible version
  • Removed that SickChill instance
  • Installed latest via sherpa package manager
  • Restored settings

What happened:

  • Service failed to restart, err 500.
  • Removed cache.db and restarted service, discovered all show data is there but all settings (from sickbeard/sickchill.conf) are missing.
  • Note: backup contains a CONFIG/sickbeard.conf file, not sure if expected

What you expected: Database restore would complete successfully.

Logs:

2020-09-22 16:40:27 DEBUG :: MAIN :: Internal name cache for The Bridge (2011) set to: [ the bridge 2011, broen ]
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: "/opt/bin/git" fetch origin --prune : returned successful
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" branch --set-upstream-to origin/master with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: "/opt/bin/git" branch --set-upstream-to origin/master : returned successful
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" rev-parse --verify --quiet "@{upstream}" with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: "/opt/bin/git" rev-parse --verify --quiet "@{upstream}" : returned successful
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" rev-list --left-right "@{upstream}"...HEAD with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: "/opt/bin/git" rev-list --left-right "@{upstream}"...HEAD : returned successful
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: cur_commit = 6ae2bf5521339d10c481a90e96e3fc29ff29f1df, newest_commit = 6ae2bf5521339d10c481a90e96e3fc29ff29f1df, num_commits_behind = 0, num_commits_ahead = 0
2020-09-22 16:40:27 DEBUG :: CHECKVERSION :: check_for_new_news: Checking GitHub for latest news.
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Aborting all threads
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the DAILYSEARCHER thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the BACKLOG thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the SHOWUPDATER thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the CHECKVERSION thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the SHOWQUEUE thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the SEARCHQUEUE thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the POSTPROCESSOR thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the POSTPROCESSOR thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the TRAKTCHECKER thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the FINDPROPERS thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the FINDSUBTITLES thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the NOTIFICATIONS thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Waiting for the EVENT-QUEUE thread to exit
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Saving all shows to the database
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Saving config file to disk
2020-09-22 16:41:28 INFO :: EVENT-QUEUE :: Shutting down Tornado
2020-09-22 16:41:38 INFO :: EVENT-QUEUE :: Restarting SickChill with ['/opt/bin/python3', '/share/MD0_DATA/.qpkg/SickChill/SickChill/SickChill.py', '--daemon', '--nolaunch', '--datadir', '/share/MD0_DATA/.qpkg/SickChill/config', '--pidfile', '/var/run/SickChill.pid']
2020-09-22 16:41:47 INFO :: MAIN :: Restore: Unable to remove the cache/mako directory: [Errno 2] No such file or directory: '/share/MD0_DATA/.qpkg/SickChill/config/cache/mako'
2020-09-22 16:41:47 DEBUG :: MAIN :: Parsed Show.Name.S02E03.HDTV.XviD-SICKCHILL into Show Name - S02E03 [GROUP: SICKCHILL] [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:41:47 DEBUG :: MAIN :: Found codec for 'Show Name: Ep Name'.
2020-09-22 16:41:47 DEBUG :: MAIN :: formatting pattern: %SN - S%0SE%0E - %EN -> Show Name - S02E03 - Ep Name
2020-09-22 16:41:47 DEBUG :: MAIN :: Parsed Show.Name.S02E03.HDTV.XviD-SICKCHILL into Show Name - S02E03 [GROUP: SICKCHILL] [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:41:47 DEBUG :: MAIN :: Found codec for 'Show Name: Ep Name'.
2020-09-22 16:41:47 DEBUG :: MAIN :: formatting pattern: Season %0S -> Season 02
2020-09-22 16:41:47 DEBUG :: MAIN :: Trying to parse Show Name - S02E03 - Ep Name.ext
2020-09-22 16:41:47 DEBUG :: MAIN :: Parsed Show Name - S02E03 - Ep Name.ext into Show Name - S02E03 [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:41:47 DEBUG :: MAIN :: The name Show Name - S02E03 - Ep Name.ext parsed into Show Name - S02E03 [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:41:49 DEBUG :: MAIN :: Checking database structure...sickchill.db
2020-09-22 16:41:49 DEBUG :: MAIN :: Database upgrade required: Add Custom Name To Show
2020-09-22 16:41:49 INFO :: MAIN :: Backing up database before upgrade
2020-09-22 16:41:49 INFO :: MAIN :: Proceeding with upgrade
2020-09-22 16:41:49 INFO :: MAIN :: Adding column custom_name to tvshows
2020-09-22 16:41:50 INFO :: MAIN :: Updated to: 44.2
2020-09-22 16:41:50 DEBUG :: MAIN :: AddCustomNameToShow upgrade completed
2020-09-22 16:41:50 DEBUG :: MAIN :: Checking database structure...cache.db
2020-09-22 16:41:50 DEBUG :: MAIN :: Database upgrade required: Results Table
2020-09-22 16:41:50 ERROR :: MAIN :: Fatal error executing query with db.action in database /share/MD0_DATA/.qpkg/SickChill/config/cache.db: near "?": syntax error
2020-09-22 16:41:50 INFO :: MAIN :: If this happened in cache.db, you can safely stop SickChill, and delete the cache.db file without losing any data
2020-09-22 16:41:50 INFO :: MAIN :: Here is the arguments that were passed to this function (This is what the developers need to know): {'self': <sickchill.oldbeard.db.DBConnection object at 0x6f876d0>, 'query': 'INSERT INTO results SELECT provider, name , season, episodes, indexerid, url, time, quality,release_group, version, seeders, leechers, size, status, failed, added FROM ?', 'args': ['binsearch'], 'fetchall': False, 'fetchone': False, 'sql_results': [], 'attempt': 0, 'e': OperationalError('near "?": syntax error'), 'severity': 40}

remove cache.db and restart

2020-09-22 16:48:43 DEBUG :: MAIN :: Parsed Show.Name.S02E03.HDTV.XviD-SICKCHILL into Show Name - S02E03 [GROUP: SICKCHILL] [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:48:43 DEBUG :: MAIN :: Found codec for 'Show Name: Ep Name'.
2020-09-22 16:48:43 DEBUG :: MAIN :: formatting pattern: %SN - S%0SE%0E - %EN -> Show Name - S02E03 - Ep Name
2020-09-22 16:48:43 DEBUG :: MAIN :: Parsed Show.Name.S02E03.HDTV.XviD-SICKCHILL into Show Name - S02E03 [GROUP: SICKCHILL] [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:48:43 DEBUG :: MAIN :: Found codec for 'Show Name: Ep Name'.
2020-09-22 16:48:43 DEBUG :: MAIN :: formatting pattern: Season %0S -> Season 02
2020-09-22 16:48:43 DEBUG :: MAIN :: Trying to parse Show Name - S02E03 - Ep Name.ext
2020-09-22 16:48:43 DEBUG :: MAIN :: Parsed Show Name - S02E03 - Ep Name.ext into Show Name - S02E03 [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:48:43 DEBUG :: MAIN :: The name Show Name - S02E03 - Ep Name.ext parsed into Show Name - S02E03 [ABD: False] [ANIME: False] [whichReg: ['anime_SxxExx']] Score: -2
2020-09-22 16:48:45 DEBUG :: MAIN :: Checking database structure...sickchill.db
2020-09-22 16:48:45 DEBUG :: MAIN :: Checking database structure...cache.db
2020-09-22 16:48:45 DEBUG :: MAIN :: Database upgrade required: Initial Schema
2020-09-22 16:48:47 DEBUG :: MAIN :: InitialSchema upgrade completed
2020-09-22 16:48:47 DEBUG :: MAIN :: Checking database structure...failed.db
2020-09-22 16:48:47 DEBUG :: MAIN :: Checking for archived episodes not qualified
2020-09-22 16:48:47 DEBUG :: MAIN :: Checking if we can use git commands: "/opt/bin/git" version
2020-09-22 16:48:47 DEBUG :: MAIN :: Executing "/opt/bin/git" version with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:47 DEBUG :: MAIN :: "/opt/bin/git" version : returned successful
2020-09-22 16:48:47 DEBUG :: MAIN :: Using: "/opt/bin/git"
2020-09-22 16:48:47 DEBUG :: MAIN :: Executing "/opt/bin/git" symbolic-ref -q HEAD with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:47 DEBUG :: MAIN :: "/opt/bin/git" symbolic-ref -q HEAD : returned successful
2020-09-22 16:48:47 DEBUG :: MAIN :: Retrieving the last check time from the DB
2020-09-22 16:48:47 DEBUG :: MAIN :: Loading initial show list
2020-09-22 16:48:47 INFO :: MAIN :: Starting SickChill [master] using '/share/MD0_DATA/.qpkg/SickChill/config/config.ini'
2020-09-22 16:48:47 INFO :: WEBSERVER :: Starting SickChill on http://0.0.0.0:7073/
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: Starting new thread: CHECKVERSION
2020-09-22 16:48:47 INFO :: CHECKVERSION :: Checking for updates using GIT
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" symbolic-ref -q HEAD with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:47 INFO :: MAIN :: Checking for scene exception updates from https://sickchill.github.io/scene_exceptions/scene_exceptions.json
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: "/opt/bin/git" symbolic-ref -q HEAD : returned successful
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" rev-parse HEAD with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: "/opt/bin/git" rev-parse HEAD : returned successful
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" config remote.origin.url https://github.com/SickChill/SickChill.git with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: "/opt/bin/git" config remote.origin.url https://github.com/SickChill/SickChill.git : returned successful
2020-09-22 16:48:47 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" fetch origin --prune with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:48 INFO :: MAIN :: Checking for XEM scene exception updates for theTVDB
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: "/opt/bin/git" fetch origin --prune : returned successful
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" branch --set-upstream-to origin/master with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: "/opt/bin/git" branch --set-upstream-to origin/master : returned successful
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" rev-parse --verify --quiet "@{upstream}" with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: "/opt/bin/git" rev-parse --verify --quiet "@{upstream}" : returned successful
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: Executing "/opt/bin/git" rev-list --left-right "@{upstream}"...HEAD with your shell in /share/MD0_DATA/.qpkg/SickChill/SickChill/sickchill
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: "/opt/bin/git" rev-list --left-right "@{upstream}"...HEAD : returned successful
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: cur_commit = 6ae2bf5521339d10c481a90e96e3fc29ff29f1df, newest_commit = 6ae2bf5521339d10c481a90e96e3fc29ff29f1df, num_commits_behind = 0, num_commits_ahead = 0
2020-09-22 16:48:48 DEBUG :: CHECKVERSION :: check_for_new_news: Checking GitHub for latest news.
2020-09-22 16:48:48 INFO :: MAIN :: Checking for scene exception updates for AniDB
2020-09-22 16:48:49 DEBUG :: MAIN :: Updated scene exceptions
2020-09-22 16:48:49 DEBUG :: MAIN :: Building internal name cache for XXXX
2020-09-22 16:48:49 DEBUG :: MAIN :: Internal name cache for XXXX set to: [ xxxx ]
[repeats for all shows]
Bug / Issue

Most helpful comment

Moving the sickbeard.conf to config.ini did indeed restore all the settings and providers etc I was expecting. Thanks @miigotu and @OneCDOnly! I'm not sure it has picked up all of the new settings available, but I will play around with it and copy/paste away if needed.

Note that the QPKG was indeed "old" eg 2018 from QNAP forums or store, but the SickChill source was pointed at this repo, master branch, and had been successfully updating until early Sep intentional break. Impressive :) Also I'm very happy with sherpa, though I've only used it to set up SC so far. Need to migrate nzbget and nzbToMedia next...

Can close from my perspective.

All 17 comments

Issue-Label Bot is automatically applying the label Bug / Issue to this issue, with a confidence of 0.76. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Hi, thanks for the report. Please use search to make sure your issue has not been reported yet, and someone will try to help you as soon as possible.

There is no error there after removing cache.db, try rebooting

Rebooting a NAS isn't a common thing I do... Tried it anyways. No difference. Restored settings again, died in same spot, removed cache.db, restarted SC. Still opens to show list intact, but with no settings imported.

The restore process fails every time the same way on cache.db migration, but more importantly even if I fix that, never restores the conf file. None of my settings are ever imported eg providers, keys, desired port, post-processing, etc.

FYI the backup structure I have in the old settings backup zip is

/
  cache.db
  CONFIG/
    sickbeard.conf
  failed.db
  sickbeard.db
  SickChill/gui/slick/cache/images/*.jpg

Is there any point in trying to move sickbeard.conf to sickchill.conf/move to different location in zip/etc?

(PS thanks for quick reply esp with new child!)

CONFIG/
    sickbeard.conf

Should be config.ini I think. Look at the contents of it, does it look like sickchill settings?

If it is, open SC, go to help&info and see the location (and name) it is loading config.ini from, then stop SC and copy the sickbeard.conf to that location and give it the right name.

I assume this is due to switching packages. @OneCDOnly might be able to help otherwise.

@norealityagent it looks like you've come from a really ancient SickBeard installation. The original Clinton Hall and QNAP_Stephane packages used CONFIG. These days, I use config.

_edit: actually, I think full uppercase was only used in Stephane's packages. Apologies to Clinton. 馃_

You can try renaming that sickbeard.conf to config.ini.

Stop SickChill first, though:

/etc/init.d/sickchill.sh stop

... then rename the config file and ensure it's placed into the config directory under the SickChill QPKG, then start SickChill again:

/etc/init.d/sickchill.sh start

I'm really not sure though if such old settings will migrate to SickChill. Usually, with a major jump like you're doing here, I'd advise to start again and configure a fresh SickChill installation from scratch. Maybe @miigotu can advise whether the settings will upgrade correctly?

Most things will translate over to the new ini just fine, there's just a ton more settings now and some even removed.

The amount of time it takes to enter your settings again might be less than figuring out what new you need to configure.

Hello everyone,
I have exactly the same problem.
I saved my sickchill python 2, delete the folder containing sickchill then clone via the site the new python 3 compatible version.
When I reapply the backup, sickchill asks me to restart the server.
From this moment, I have to restart the server manually and when I find myself on the home page I do not see my shows and when I perform an action I have the following error message:

2020-09-22 21:35:43 Uncaught exception% s
% r

Cannot use sickichill in python3 version with python 2 backup

@C0rwen make sure LANG environment variable is set, like en_US.UTF-8. Also, make sure you git pull the latest version, that error should have been fixed like 2 weeks ago iirc.

@miigotu I have the last version.
Where can i find LANG environment variable

@miigotu And I'm french, is it a problem ?

Moving the sickbeard.conf to config.ini did indeed restore all the settings and providers etc I was expecting. Thanks @miigotu and @OneCDOnly! I'm not sure it has picked up all of the new settings available, but I will play around with it and copy/paste away if needed.

Note that the QPKG was indeed "old" eg 2018 from QNAP forums or store, but the SickChill source was pointed at this repo, master branch, and had been successfully updating until early Sep intentional break. Impressive :) Also I'm very happy with sherpa, though I've only used it to set up SC so far. Need to migrate nzbget and nzbToMedia next...

Can close from my perspective.

Sorry but i have already the file in config.ini

And I have the probleme again

Huh? Set your LANG variable to fr_FR.UTF-8.

In the system or in config.ini ?

The system.

Was this page helpful?
0 / 5 - 0 ratings