-
Notifications
You must be signed in to change notification settings - Fork 481
Unhandled error in plugin subliminal: decode() #2145
Copy link
Copy link
Closed
Description
Expected behaviour:
Subliminal sometimes fallback to use Chardet (ref.) to guess the encoding of downloaded subtitles. If Chardet could not determine the encoding and return None. The plugin should fail the entry and continue.
Actual behaviour:
Subliminal plugin aborted the task and saved outstanding entries to backlog. However those backlog entries were never processed due to repeated error on next execution.
Config:
# Download Subtitles
subtitles_download:
priority: 600
template:
- no_global
seen: local
no_entries_ok: yes
subtitle_list:
list: subtitles
recursion_depth: 3
list_match:
from:
- subtitle_list:
list: subtitles
subliminal:
languages:
- zho
alternatives:
- eng
exact_match: no
providers: [shooter, addic7ed, opensubtitles]
single: noLog:
2018-05-24 14:50 INFO subliminal.providers.shooter subtitles_download Downloading subtitle <ShooterSubtitle u'https://www.shooter.cn/api/subapi.php?fetch=MTUyNzE0NDYzMHw4bVN3YWFRTExPWjk3YlBjOVdTNjM0NkpwVElPQlJYYlNEVW5YLXNqdnE4SVZra0phUldVbk4tYjFIUHA2WUxVWWZBQVl5UzZ5VjMxd0dlRzdjemZXQ2JSMkh2WTlwb2xBbTI4WUNBc09rRkc0YzJwOV9XajRRaDlYX0hTQ0Jxa2dRUnlOQUZVYlN4N1Y3ckVrSUxUT3RFcVdKUzQ5eGM9fMk3jwsZCix9GTnbwwNwec86iiKgtIuPscMyHVSQE2aZ&nonce=R%0F%16B%16%E7%94%F3.%1A%CC%7C%E4L%AB+' [zh]>
2018-05-24 14:50 INFO subliminal.subtitle subtitles_download Guessing encoding for language zh
2018-05-24 14:50 WARNING subliminal.subtitle subtitles_download Could not guess encoding from language
2018-05-24 14:50 DEBUG chardet.charsetprober subtitles_download SHIFT_JIS Japanese prober hit error at byte 8
...
2018-05-24 15:07 DEBUG chardet.universaldetector subtitles_download windows-1255 Hebrew confidence = 0.0144222722366
2018-05-24 15:07 DEBUG chardet.universaldetector subtitles_download windows-1255 Hebrew confidence = 0.0144222722366
2018-05-24 15:07 INFO subliminal.subtitle subtitles_download Chardet found encoding None
2018-05-24 15:07 INFO subliminal.core subtitles_download Terminating provider shooter
2018-05-24 15:07 CRITICAL task subtitles_download BUG: Unhandled error in plugin subliminal: decode() argument 1 must be string, not None
2018-05-24 15:07 CRITICAL manager subtitles_download An unexpected crash has occurred. Writing crash report to ~/.config/flexget/crash_report.2018.05.24.150724032172.log. Please verify you are running the latest version of flexget by using "flexget -V" from CLI or by using version_checker plugin at http://flexget.com/wiki/Plugins/version_checker. You are currently using version 2.13.19
2018-05-24 15:07 DEBUG manager subtitles_download Traceback:
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/flexget/task.py", line 486, in __run_plugin
return method(*args, **kwargs)
File "/opt/lib/python2.7/site-packages/flexget/event.py", line 23, in __call__
return self.func(*args, **kwargs)
File "/opt/lib/python2.7/site-packages/flexget/plugins/output/subtitles_subliminal.py", line 197, in on_task_output
hearing_impaired=hearing_impaired)
File "/opt/lib/python2.7/site-packages/subliminal/core.py", line 227, in download_best_subtitles
if self.download_subtitle(subtitle):
File "/opt/lib/python2.7/site-packages/subliminal/core.py", line 182, in download_subtitle
if not subtitle.is_valid():
File "/opt/lib/python2.7/site-packages/subliminal/subtitle.py", line 85, in is_valid
if not self.text:
File "/opt/lib/python2.7/site-packages/subliminal/subtitle.py", line 76, in text
return self.content.decode(self.guess_encoding(), errors='replace')
TypeError: decode() argument 1 must be string, not None
2018-05-24 15:07 WARNING task subtitles_download Aborting task (plugin: subliminal)
2018-05-24 15:07 DEBUG backlog subtitles_download Remembering all entries to backlog because of task abort.
2018-05-24 15:07 DEBUG backlog subtitles_download Saving The.Wrestler.2008.1080p.BluRay.x264-REFiNED
...
2018-05-24 15:07 DEBUG task_queue task subtitles_download aborted: TaskAbort(reason=BUG: Unhandled error in plugin subliminal: decode() argument 1 must be string, not None, silent=False)
Additional information:
- FlexGet version: 2.13.19
- Python version: 2.7.12
- Installation method: pip install flexget globally
- Using daemon (yes/no): yes
- OS and version: Embedded Linux of WD Mybook Live Duo
- Return of
uname -a:Linux 2.6.32.11-svn70860 #1 Thu May 17 13:32:51 PDT 2012 ppc GNU/Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels