-
Notifications
You must be signed in to change notification settings - Fork 481
Failed to upgrade database for plugin input_cache: 'title' #2636
Copy link
Copy link
Closed
Labels
Description
Expected behaviour:
For daemon to start and execute tasks. After upgrading to most recent build, it tried to update the database and crashes every time.
Actual behaviour:
Any cli command crashes flexget
Steps to reproduce:
- Step 1: run any task
Config:
(click to expand)
web_server: yes
variables: secret.yml
templates:
global:
no_entries_ok: yes
notify:
abort:
via:
- telegram:
bot_token: '{? telegram.token ?}'
parse_mode: markdown
disable_previews: no
recipients:
- username: '{? telegram.usr ?}'
##################################################################
# TV TEMPLATE
##################################################################
vic_tv:
set:
path: /media/CHEWYHDD/CHEWY/Videos/temp
move_completed_path: /media/CHEWYHDD/CHEWY/Videos/TV/NEW EPISODES/{{tvdb_series_name}}/Season {{tvdb_season}}/
label: NEW EPISODES
configure_series:
from:
trakt_list:
username: '{? trak.usr ?}'
account: '{? trak.acct ?}'
list: vic tv
type: shows
settings:
quality: 1080p
propers: 16 hours
specials: no
verify_ssl_certificates: no
thetvdb_lookup: yes
series:
- Shameless (2011):
alternate_name: Shameless (US)
- Tell Me a Story (2018):
alternate_name: Tell Me a Story (US)
- Real Time with Bill Maher (2003):
identified_by: ep
- Masterchef (2010):
alternate_name: Masterchef (US)
deluge:
host: localhost
port: '{? deluge.port ?}'
username: '{? deluge.usr ?}'
password: '{? deluge.pwd ?}'
##################################################################
# DOWNLOAD NOTIFICATION TEMPLATE
##################################################################
telegram_notify:
thetvdb_lookup: yes
tvmaze_lookup: yes
imdb_lookup: yes
tmdb_lookup: yes
notify:
entries:
title: 'flexget {{task}}'
message: |+
{% if series_name is defined -%}
*{{series_name}}* - {{series_id}} - {{quality|d('')}}
*{{tvmaze_ep_name|d(tvdb_ep_name)|d('')}}*
*Air date:* {{tvdb_ep_air_date|d(tvmaze_episode_airdate)|d('')}}
*Summary:* {{tvdb_ep_overview}}
[Image]({{tvmaze_series_original_image|replace("_", "%5F")}})
[Show page]({{tvmaze_series_url|replace("_", "%5F")}})
{% elif imdb_name is defined -%}
*{{imdb_name}}* - ({{imdb_year}})
{{quality|d('')}}
{{imdb_score}}/10 - {{imdb_votes}} votes
{{imdb_genres|join(', ')|title}}
*Plot:* {{imdb_plot_outline}}
[Image]({{tmdb_posters[0]|replace("_", "%5F")}})
[Movie Page]({{imdb_url|d('')}})
{% else -%}
{{title}}
{%- endif -%}
via:
- telegram:
bot_token: '{? telegram.token ?}'
parse_mode: markdown
disable_previews: no
recipients:
- username: '{? telegram.usr ?}'
##################################################################
# MOVIE TEMPLATE
##################################################################
movie:
tmdb_lookup: yes
proper_movies: no
content_size:
max: 5000
strict: no
content_filter:
reject:
- '*.zip'
- '*.wmv'
- '*.wma'
- '*[cC]odec*'
- '*[rR]eadme*'
exists_movie:
- /media/CHEWYHDD/CHEWY/Videos/Movies
- /media/CHEWYHDD/CHEWY/Videos/Addison/Addison Movies
#################################################################
# FILTERS TEMPLATES
##################################################################
filters:
regexp:
reject:
- \bmsd\b: {from: title}
- \bgreek\b: {from: title}
- \bgerman\b: {from: title}
- \bfrench\b: {from: title}
- \brussian\b: {from: title}
- \bswedish\b: {from: title}
- \bspanish\b: {from: title}
- \bhindi\b: {from: title}
- \barabic\b: {from: title}
- \bitalian\b: {from: title}
- \bpolish\b: {from: title}
- \bromanian\b: {from: title}
- \bdutch\b: {from: title}
- \bczech\b: {from: title}
- \bturkish\b: {from: title}
- \brmvb\b: {from: title}
# - \bkorean\b: {from: title}
- \bwmv\b: {from: title}
# - (s|d)ub(s|bed)?\b: {from: title}
- \bFRENCH\b: {from: title}
- \bSPANiSH\b: {from: title}
- \bLatino\b: {from: title}
- \btrailer\b: {from: title}
- \bHDTC\b: {from: title}
- \bHDTS\b: {from: title}
- \bHQTS\b: {from: title}
- \bHDcam\b: {from: title}
- \bR5\b: {from: title}
- \b3-?D\b: {from: title} # I don't have any 3D displays
- \btrailer\b: {from: title} # I've gotten a few trailers that matched as movies. VERY annoying
- \bTS\b: {from: title}
- \bCam\b: {from: title}
- '{C_P}': {from: title} # The following are groups with poor quality releases
- TrTd TeaM: {from: title}
- \[TNTVillage\]: {from: title}
- \bFLEET\b: {from: title}
- \b0SEC\b: {from: title}
- \[facepalm\]: {from: title}
- FASTSUB: {from: title}
- VOSTFR: {from: title}
- Subtitulado: {from: title}
- \bNORDiC\b: {from: title}
- \biPad\b: {from: title}
# - \b(ita|ger|fra|spa|swe|nor|nordic|fr|kor|uk|esp|nl|pl|spanish)\b: {from: title}
- \bR6\b: {from: title}
- \bTemporada\b: {from: title}
- \bDual\b: {from: title}
- \bTamil*\b: {from: title}
- \bJapanese\b: {from: title}
- \bJajji!\b: {from: title}
- \bdragons.den.(ca|uk)\b: {from: title}
- \bx265\b: {from: title}
# - \HC\b: {from: title}
- \b480p\b: {from: title}
- \b.TamilRock*\b: {from: title}
- \b1xbet\b: {from: title}
- \bCAMRip\b: {from: title}
- \bHDCAMRip\b: {from: title}
##################################################################
# TASK SCHEDULES
##################################################################
schedules:
- tasks: tv_shows
interval:
minutes: 5
- tasks: IMDB
interval:
minutes: 30
- tasks: list_cleanup
interval:
weeks: 1
- tasks: passthepopcorn
interval:
hours: 2
- tasks: movies
interval:
hours: 1
##################################################################
# TASKS
##################################################################
tasks:
tv_shows:
cfscraper: yes
priority: 1
template:
- vic_tv
- telegram_notify
- filters
inputs:
- rss: '{? btn.url ?}'
# - rss: '{? mtv.url ?}'
IMDB:
imdb_list:
login: '{? imdb.usr ?}'
password: '{? imdb.pwd ?}'
list: watchlist
accept_all: yes
seen:
fields: [title]
list_add:
- movie_list: vic_movies
priority: 2
list_cleanup:
movie_list: vic_movies
crossmatch:
from:
- imdb_list:
login: '{? imdb.usr ?}'
password: '{? imdb.pwd ?}'
list: watchlist
action: reject
fields: [imdb_id]
accept_all: yes
list_remove:
- movie_list: vic_movies
seen: no
passthepopcorn:
priority: 4
template:
- movie
- telegram_notify
- filters
quality: hdrip+
imdb_lookup: yes
list_match:
from:
- movie_list: vic_movies
list_add:
- entry_list: downloaded_movies
verify_ssl_certificates: no
inputs:
- rss: '{? ptp.url ?}'
set:
path: /media/CHEWYHDD/CHEWY/Videos/temp
move_completed_path: /media/CHEWYHDD/CHEWY/Videos/Movies/
deluge:
host: localhost
port: '{? deluge.port ?}'
username: '{? deluge.usr ?}'
password: '{? deluge.pwd ?}'
label: Movies
movies:
priority: 5
template:
- movie
- telegram_notify
- filters
discover:
release_estimations:
optimistic: 60 days
what:
- movie_list: vic_movies
from:
- yts: yes
- rarbg:
category: [14, 15, 16, 17, 21, 22, 42, 44, 45, 46, 47, 48]
- 1337x: yes
- piratebay:
category: movies
interval: 1 hour
quality: 720p+
list_match:
from:
- movie_list: vic_movies
list_add:
- entry_list: downloaded_movies
torrent_alive: 10
verify_ssl_certificates: no
set:
path: /media/CHEWYHDD/CHEWY/Videos/temp
move_completed_path: /media/CHEWYHDD/CHEWY/Videos/Movies/
deluge:
host: localhost
port: '{? deluge.port ?}'
username: '{? deluge.usr ?}'
password: '{? deluge.pwd ?}'
ratio: .01
label: Public
Log:
(click to expand)
2020-03-22 16:58:34.940 | DEBUG | flexget.tray_icon:<module>:20 - Could not import pystray: libopenjp2.so.7: cannot open shared object file: No such file or directory
2020-03-22 16:58:38 INFO manager Database upgrade is required. Attempting now.
2020-03-22 16:58:39 ERROR schema Failed to upgrade database for plugin input_cache: 'title'
Traceback (most recent call last):
File "/home/pi/flexget/bin/flexget", line 8, in <module>
sys.exit(main())
| | -> <function main at 0xb66dea98>
| -> <built-in function exit>
-> <module 'sys' (built-in)>
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/__init__.py", line 41, in main
manager.start()
| -> <function Manager.start at 0xb5293738>
-> <flexget.manager.Manager object at 0xb66df910>
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/manager.py", line 375, in start
self.initialize()
| -> <function Manager.initialize at 0xb528a270>
-> <flexget.manager.Manager object at 0xb66df910>
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/manager.py", line 242, in initialize
fire_event('manager.upgrade', self)
| -> <flexget.manager.Manager object at 0xb66df910>
-> <function fire_event at 0xb57b2bb8>
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/event.py", line 112, in fire_event
result = event(*args, **kwargs)
| | -> {}
| -> (<flexget.manager.Manager object at 0xb66df910>,)
-> <Event(name=manager.upgrade,func=upgrade_wrapper,priority=128)>
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/event.py", line 22, in __call__
return self.func(*args, **kwargs)
| | | -> {}
| | -> (<flexget.manager.Manager object at 0xb66df910>,)
| -> <function upgrade.<locals>.upgrade_decorator.<locals>.upgrade_wrapper at 0xb21e8cd8>
-> <Event(name=manager.upgrade,func=upgrade_wrapper,priority=128)>
> File "/home/pi/flexget/lib/python3.7/site-packages/flexget/db_schema.py", line 154, in upgrade_wrapper
new_ver = upgrade_func(current_ver, session)
| | -> <sqlalchemy.orm.session.ContextSession object at 0xb0e70eb0>
| -> 1
-> <function upgrade at 0xb21e8c48>
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/utils/cached_input.py", line 49, in upgrade
title = str(data.pop('title'))
| -> <method 'pop' of 'dict' objects>
-> {'serializer': 'Entry', 'version': 1, 'value': {'fields': {'original_url': 'https://trakt.tv/shows/true-detective', 'url': 'h...
KeyError: 'title'
Traceback (most recent call last):
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/db_schema.py", line 154, in upgrade_wrapper
new_ver = upgrade_func(current_ver, session)
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/utils/cached_input.py", line 49, in upgrade
title = str(data.pop('title'))
KeyError: 'title'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/flexget/bin/flexget", line 8, in <module>
sys.exit(main())
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/__init__.py", line 41, in main
manager.start()
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/manager.py", line 375, in start
self.initialize()
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/manager.py", line 242, in initialize
fire_event('manager.upgrade', self)
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/event.py", line 112, in fire_event
result = event(*args, **kwargs)
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/event.py", line 22, in __call__
return self.func(*args, **kwargs)
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/db_schema.py", line 165, in upgrade_wrapper
manager.shutdown(finish_queue=False)
File "/home/pi/flexget/lib/python3.7/site-packages/flexget/manager.py", line 1033, in shutdown
raise RuntimeError('Cannot shutdown manager that was never initialized.')
RuntimeError: Cannot shutdown manager that was never initialized.
(flexget) pi@pi4:~ $
Additional information:
- FlexGet version: v3.1.43
- Python version: 3.7
- Installation method: Raspberry Pi 4 virtualenv
- Using daemon (yes/no): yes
- OS and version: raspbian buster
- Link to crash log:
Reactions are currently unavailable