Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SonarrPostConversion and Subtitle retrieval errors #1077

Closed
cryo-kronos opened this issue Oct 28, 2019 · 22 comments
Closed

SonarrPostConversion and Subtitle retrieval errors #1077

cryo-kronos opened this issue Oct 28, 2019 · 22 comments

Comments

@cryo-kronos
Copy link

cryo-kronos commented Oct 28, 2019

I'm seeing two errors over and over in my mp4_automator log.

SonarrPostConversion error:

2019-10-27 20:03:46 - qtfaststart - INFO - Writing output...
2019-10-27 20:04:47 - SonarrPostConversion - ERROR - Sonarr monitor status update failed.
Traceback (most recent call last):
File "/Users/USERNAME/Scripts/sickbeard_mp4_automator/postSonarr.py", line 106, in
log.info("Sonarr response: ID %d %s." % (rstate['id'], rstate['state']))
TypeError: list indices must be integers, not str
2019-10-27 20:29:52 - SonarrPostConversion - INFO - Sonarr extra script post processing started.
2019-10-27 20:29:52 - SonarrPostConversion - INFO - Sonarr extra script post processing started.
2019-10-27 20:29:52 - SonarrPostConversion - INFO - Sonarr extra script post processing started.
2019-10-27 20:29:52 - readSettings - INFO - /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
2019-10-27 20:29:52 - readSettings - INFO - /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
2019-10-27 20:29:52 - readSettings - INFO - /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
2019-10-28 00:03:29 - SonarrPostConversion - INFO - Sonarr extra script post processing started.
2019-10-28 00:03:29 - readSettings - INFO - /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
2019-10-28 02:36:01 - SonarrPostConversion - INFO - Sonarr extra script post processing started.
2019-10-28 02:36:01 - readSettings - INFO - /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
2019-10-28 11:46:09 - SonarrPostConversion - INFO - Sonarr extra script post processing started.
2019-10-28 11:46:09 - readSettings - INFO - /usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Subtitle error:

2019-10-26 16:23:27 - mkvtomp4 - INFO - Reading video stream.
2019-10-26 16:23:27 - mkvtomp4 - INFO - Video codec detected: h264.
2019-10-26 16:23:27 - mkvtomp4 - INFO - Pix Fmt: yuv420p.
2019-10-26 16:23:27 - mkvtomp4 - INFO - Profile: High.
2019-10-26 16:23:27 - mkvtomp4 - INFO - Reading audio streams.
2019-10-26 16:23:27 - mkvtomp4 - INFO - No audio streams detected in any appropriate language, relaxing restrictions so there will be some audio stream present.
2019-10-26 16:23:27 - mkvtomp4 - INFO - Audio detected for stream #1: ac3 [eng].
2019-10-26 16:23:27 - mkvtomp4 - INFO - Creating audio stream 0 from source stream 1.
2019-10-26 16:23:27 - mkvtomp4 - INFO - Reading subtitle streams.
2019-10-26 16:23:27 - mkvtomp4 - ERROR - Unable to verify subtitle languages for download.
Traceback (most recent call last):
File "/Users/USERNAME/Scripts/sickbeard_mp4_automator/mkvtomp4.py", line 597, in generateOptions
languages.add(Language(alpha3))
File "/usr/local/lib/python2.7/site-packages/babelfish/language.py", line 82, in init
raise ValueError('%r is not a valid language' % language)
ValueError: 'en' is not a valid language
2019-10-26 16:23:27 - mkvtomp4 - WARNING - Subtitle language array is empty.

Any suggestions for fixing these two errors?

@mdhiggins
Copy link
Owner

What version of babelfish you have installed?

@mdhiggins
Copy link
Owner

Also you may need to set your language to eng and en if memory serves

@cryo-kronos
Copy link
Author

cryo-kronos commented Oct 29, 2019

Babelfish version is 0.5.5. I changed the subtitle language in the autoProcess.ini to "eng" from "en". Now it seems to be working. Changing it back to "en" triggers the error message again. Weird.

I'm still seeing the SonarrPostConversion error and also seeing a mkvtomp4 tagging error:

2019-10-28 15:26:29 - tvdb_mp4 - ERROR - Exception while retrieving poster 'NoneType' object has no attribute 'bannerpath'.
2019-10-28 15:26:29 - tvdb_mp4 - INFO - Trying to write tags.
2019-10-28 15:26:29 - tvdb_mp4 - INFO - Tags written successfully.
2019-10-28 15:26:29 - mkvtomp4 - INFO - Relocating MOOV atom to start of file.
2019-10-28 15:26:29 - qtfaststart - INFO - Removing free atom at 32 (8 bytes)
2019-10-28 15:26:29 - qtfaststart - INFO - Patching stco with 35130 entries
2019-10-28 15:26:29 - qtfaststart - INFO - Patching stco with 35130 entries
2019-10-28 15:26:29 - qtfaststart - INFO - Writing output...
2019-10-28 15:27:11 - SonarrPostConversion - ERROR - Sonarr monitor status update failed.
Traceback (most recent call last):
File "/Users/strafe/Scripts/sickbeard_mp4_automator/postSonarr.py", line 106, in
log.info("Sonarr response: ID %d %s." % (rstate['id'], rstate['state']))
TypeError: list indices must be integers, not str

@mdhiggins
Copy link
Owner

Does the TV show you’re tagging have posters? That appears to be what the error is

The other error seems to be the script having a hard time talking to your sonarr API. Do you have all those settings configured appropriately in autoProcess.ini? What version of sonarr are you running

@cryo-kronos
Copy link
Author

cryo-kronos commented Oct 29, 2019

I'm running Sonarr 3.x (latest version 3.0.3.652). Both Sonarr and mp4_automator are on the same computer.

In Sonarr, under "Completed Download Handling",
"Automatically import completed downloads from download client" is enabled and "Remove imported downloads from download client history" is disabled.

In my autoProcess ini, Sonarr is set up as follows:

[Sonarr]
host = localhost
port = 8989
web_root =
ssl = False
apikey = correct Sonarr API [not shown]

@mdhiggins
Copy link
Owner

mdhiggins commented Oct 29, 2019 via email

@cryo-kronos
Copy link
Author

cryo-kronos commented Oct 29, 2019

You need to put the API key in there

I do have the API key there. I just removed it before posting my settings here.

@mdhiggins
Copy link
Owner

mdhiggins commented Oct 29, 2019 via email

@mdhiggins
Copy link
Owner

mdhiggins commented Oct 29, 2019 via email

@cryo-kronos
Copy link
Author

Thanks. I'll switch those two lines and report back. And I'll try out Sonarr 2 tomorrow.

@mdhiggins
Copy link
Owner

I'll keep an eye out, switching the lines should show us what sonarr is returning in full and why reading the ID and state is failing hopefully, so do that before the sonarr 2 downgrade cause it might just be they changed the packet in 3 though from what I understand the API should be generally untouched and any new API features are contained behind a /v3/ URL

@cryo-kronos
Copy link
Author

cryo-kronos commented Nov 8, 2019

Error is still there but with additional debugging info (I hope). I still haven't tried Sonarr v.2 since it's on another computer. Will try it tonight and report back.

2019-11-08 07:44:34 - mkvtomp4 - INFO - Relocating MOOV atom to start of file.
2019-11-08 07:44:34 - qtfaststart - INFO - Removing free atom at 32 (8 bytes)
2019-11-08 07:44:34 - qtfaststart - INFO - Patching stco with 32909 entries
2019-11-08 07:44:34 - qtfaststart - INFO - Patching stco with 33020 entries
2019-11-08 07:44:34 - qtfaststart - INFO - Patching stco with 469 entries
2019-11-08 07:44:34 - qtfaststart - INFO - Writing output...
2019-11-08 07:45:01 - SonarrPostConversion - INFO - [{u'body': {u'name': u'CheckForFinishedDownload', u'sendUpdatesToClient': False, u'completionMessage': u'Completed', u'updateScheduledTask': True, u'trigger': u'scheduled', u'lastExecutionTime': u'2019-11-08T15:42:34.877669Z', u'requiresDiskAccess': True, u'suppressMessages': False, u'isExclusive': False}, u'status': u'started', u'name': u'CheckForFinishedDownload', u'startedOn': u'2019-11-08T15:43:53.481571Z', u'started': u'2019-11-08T15:43:53.496571Z', u'sendUpdatesToClient': False, u'stateChangeTime': u'2019-11-08T15:43:53.496571Z', u'manual': False, u'id': 160992, u'priority': u'low', u'state': u'started', u'trigger': u'scheduled', u'lastExecutionTime': u'2019-11-08T15:42:34.877669Z', u'queued': u'2019-11-08T15:43:53.481571Z', u'updateScheduledTask': True}]
2019-11-08 07:45:01 - SonarrPostConversion - ERROR - Sonarr monitor status update failed.
Traceback (most recent call last):
File "/Users/username/Scripts/sickbeard_mp4_automator/postSonarr.py", line 107, in
log.info("Sonarr response: ID %d %s." % (rstate['id'], rstate['state']))
TypeError: list indices must be integers, not str
2019-11-08 08:46:50 - SonarrPostConversion - INFO - Sonarr extra script post processing started.

@cryo-kronos
Copy link
Author

cryo-kronos commented Nov 8, 2019

Error is occurring with Sonarr v.2, as well. It's on a different system and OS version. Looking at an old log file, the error appears in the log file going back to Nov 2018.

2019-11-08 14:45:39 - mkvtomp4 - INFO - Starting conversion.
2019-11-08 14:45:44 - mkvtomp4 - INFO - /Volumes/mini/Users/Shared/MiniVideos/TV/TV Show/Season 03/TV Show - S03E06 - Season Finale [WEBDL-480p.x264.AAC].m4v created.
2019-11-08 14:45:44 - SonarrPostConversion - INFO - Tagging /Volumes/mini/Users/Shared/MiniVideos/TV/TV Show/Season 03/TV Show - S03E06 - Season Finale [WEBDL-480p.x264.AAC].mp4 with ID 55867 season 03 episode 6.
2019-11-08 14:47:06 - tvdb_mp4 - INFO - Tagging file: /Volumes/mini/Users/Shared/MiniVideos/TV/TV Show/Season 03/TV Show - S03E06 - Season Finale [WEBDL-480p.x264.AAC].m4v.
2019-11-08 14:47:07 - tvdb_mp4 - ERROR - Exception while retrieving poster 'NoneType' object has no attribute 'bannerpath'.
2019-11-08 14:47:07 - tvdb_mp4 - INFO - Trying to write tags.
2019-11-08 14:47:07 - tvdb_mp4 - INFO - Tags written successfully.
2019-11-08 14:47:07 - mkvtomp4 - INFO - Relocating MOOV atom to start of file.
2019-11-08 14:47:07 - qtfaststart - INFO - Removing free atom at 32 (8 bytes)
2019-11-08 14:47:07 - qtfaststart - INFO - Patching stco with 32185 entries
2019-11-08 14:47:07 - qtfaststart - INFO - Patching stco with 32185 entries
2019-11-08 14:47:07 - qtfaststart - INFO - Writing output...
2019-11-08 14:47:09 - SonarrPostConversion - ERROR - Sonarr monitor status update failed.
Traceback (most recent call last):
File "/Users/username/sickbeard_mp4_automator/postSonarr.py", line 106, in
log.info("Sonarr response: ID %d %s." % (rstate['id'], rstate['state']))
TypeError: list indices must be integers, not str

@mdhiggins
Copy link
Owner

Alright that was very helpful
I just pushed an update that might address this, please give it a shot with the latest build

@cryo-kronos
Copy link
Author

You update seems to have fixed the rstate error. Thank you.

I'm still seeing subtitle errors for addic7ed.com but I don't know if that is a website issue or a script issue.

2019-11-09 00:48:00 - subliminal.api - INFO - Listing subtitles with provider 'addic7ed' and languages set([<Language [en]>])
2019-11-09 00:48:00 - subliminal.api - INFO - Initializing provider addic7ed
2019-11-09 00:48:00 - subliminal.providers.addic7ed - INFO - Getting show ids
2019-11-09 00:48:02 - subliminal.providers.addic7ed - WARNING - Series not found in show ids
2019-11-09 00:48:02 - subliminal.providers.addic7ed - INFO - Searching show ids with {'search': u'Supernatural', 'Submit': 'Search'}
2019-11-09 00:48:02 - subliminal.api - ERROR - Unexpected error in provider 'addic7ed', discarding it
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/subliminal/api.py", line 116, in list_subtitles
provider_subtitles = self[name].list_subtitles(video, provider_languages)
File "/usr/local/lib/python2.7/site-packages/subliminal/providers/addic7ed.py", line 259, in list_subtitles
return [s for s in self.query(video.series, video.season, video.year)
File "/usr/local/lib/python2.7/site-packages/subliminal/providers/addic7ed.py", line 214, in query
show_id = self.get_show_id(series, year, country)
File "/usr/local/lib/python2.7/site-packages/subliminal/providers/addic7ed.py", line 208, in get_show_id
show_id = self._search_show_id(series)
File "</usr/local/lib/python2.7/site-packages/decorator.pyc:decorator-gen-4>", line 2, in _search_show_id
File "/usr/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 1272, in get_or_create_for_user_func
should_cache_fn, (arg, kw))
File "/usr/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 879, in get_or_create
async_creator) as value:
File "/usr/local/lib/python2.7/site-packages/dogpile/lock.py", line 186, in enter
return self._enter()
File "/usr/local/lib/python2.7/site-packages/dogpile/lock.py", line 93, in _enter
generated = self._enter_create(value, createdtime)
File "/usr/local/lib/python2.7/site-packages/dogpile/lock.py", line 179, in _enter_create
return self.creator()
File "/usr/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 839, in gen_value
created_value = creator(*creator_args[0], **creator_args[1])
File "/usr/local/lib/python2.7/site-packages/subliminal/providers/addic7ed.py", line 156, in _search_show_id
r.raise_for_status()
File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)

@mdhiggins
Copy link
Owner

That's one of the subtitle providers that appears to be failing, maybe they're down or not operating anymore
I would just turn them off in your autoProcess.ini and see if that helps

sub-providers = addic7ed, podnapisi, thesubdb, opensubtitles
sub-providers = podnapisi, thesubdb, opensubtitles

@mdhiggins
Copy link
Owner

Also what version of subliminal do you have installed?

@cryo-kronos
Copy link
Author

Subliminal 1.1.1.

@mdhiggins
Copy link
Owner

The addic7ed failure shouldn't be a hard stop though either way

@cryo-kronos
Copy link
Author

cryo-kronos commented Nov 9, 2019

Their website is up and the search function works. So who knows? I’ll monitor it and if the errors continue I’ll just disable it.

Does your script or subliminal use an api for addic7ed.com or does it just access their website search?

@mdhiggins
Copy link
Owner

My script just uses subliminal which is an external project that handles the subtitles, its an older version of subliminal though so that may be why we're starting to see failures. I haven't had time to upgrade to the latest version which was a rewrite and not backwards compatible

@cryo-kronos
Copy link
Author

Just found this:
Diaoul/subliminal#964

Looks like addic7ed.com login authentication is broken and without authentication, they only allow a very limited number of searches. This is probably why I'm seeing this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants