morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.76k stars 216 forks source link

Library subtitle scans fail on files with no audio instead of skipping #2584

Closed mordant80 closed 1 month ago

mordant80 commented 1 month ago

Describe the bug Search for Missing Series or Movies Subtitles jobs fail if no English audio stream or no audio stream is detected

To Reproduce Run automatic or manual subtitle search on library with a file that is missing an audio stream,

Expected behavior I would expect it to skip the file and move on instead of the entire job erroring out and stopping.

Screenshots image

Software (please complete the following information):

Additional context Related Log entry: 2024-07-17 19:57:47|ERROR |root |BAZARR an exception occurs during the synchronization process for this subtitles: /media/TV/TRIGUN STAMPEDE/Season 1/TRIGUN STAMPEDE - S01E05 - Child of Blessing WEBDL-1080p.en.srt|'Traceback (most recent call last):\n File "/app/bin/bazarr/subtitles/tools/subsyncer.py", line 97, in sync\n result = run(self.args)\n ^^^^^^^^^^^^^^\n File "/app/bin/bazarr/../libs/ffsubsync/ffsubsync.py", line 509, in run\n sync_was_successful = _run_impl(args, result)\n ^^^^^^^^^^^^^^^^^^^^^^^\n File "/app/bin/bazarr/../libs/ffsubsync/ffsubsync.py", line 445, in _run_impl\n reference_pipe.fit(args.reference)\n File "/app/bin/bazarr/../libs/ffsubsync/sklearn_shim.py", line 255, in fit\n self._final_estimator.fit(Xt, y, fit_params)\n File "/app/bin/bazarr/../libs/ffsubsync/speech_transformers.py", line 429, in fit\n raise ValueError(\nValueError: Unable to detect speech. Perhaps try specifying a different stream / track, or a different vad.'| 2024-07-17 19:57:47|ERROR |apscheduler.executors.default |Job "Search for Missing Series Subtitles (trigger: interval[6:00:00], next run at: 2024-07-17 21:56:45 EDT)" raised an exception|'Traceback (most recent call last):\n File "/app/bin/bazarr/subtitles/tools/subsyncer.py", line 97, in sync\n result = run(self.args)\n ^^^^^^^^^^^^^^\n File "/app/bin/bazarr/../libs/ffsubsync/ffsubsync.py", line 509, in run\n sync_was_successful = _run_impl(args, result)\n ^^^^^^^^^^^^^^^^^^^^^^^\n File "/app/bin/bazarr/../libs/ffsubsync/ffsubsync.py", line 445, in _run_impl\n reference_pipe.fit(args.reference)\n File "/app/bin/bazarr/../libs/ffsubsync/sklearn_shim.py", line 255, in fit\n self._final_estimator.fit(Xt, y, fit_params)\n File "/app/bin/bazarr/../libs/ffsubsync/speech_transformers.py", line 429, in fit\n raise ValueError(\nValueError: Unable to detect speech. Perhaps try specifying a different stream / track, or a different vad.\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/app/bin/bazarr/../libs/apscheduler/executors/base.py", line 125, in run_job\n retval = job.func(*job.args, job.kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/app/bin/bazarr/subtitles/wanted/series.py", line 118, in wanted_search_missing_subtitles_series\n wanted_download_subtitles(episode.sonarrEpisodeId)\n File "/app/bin/bazarr/subtitles/wanted/series.py", line 84, in wanted_download_subtitles\n _wanted_episode(episode)\n File "/app/bin/bazarr/subtitles/wanted/series.py", line 48, in _wanted_episode\n for result in generate_subtitles(path_mappings.path_replace(episode.path),\n File "/app/bin/bazarr/subtitles/download.py", line 113, in generate_subtitles\n processed_subtitle = process_subtitle(subtitle=subtitle, media_type=media_type,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/app/bin/bazarr/subtitles/processing.py", line 89, in process_subtitle\n sync_subtitles(video_path=path, srt_path=downloaded_path,\n File "/app/bin/bazarr/subtitles/sync.py", line 41, in sync_subtitles\n subsync.sync(sync_kwargs)\n File "/app/bin/bazarr/subtitles/tools/subsyncer.py", line 101, in sync\n raise OSError\nOSError'|

JaiZed commented 1 month ago

Try commenting out line 101 in subsyncer.py (raise OSError) and then restart Bazarr and try again. Let us know if that helps.

mordant80 commented 1 month ago

Try commenting out line 101 in subsyncer.py (raise OSError) and then restart Bazarr and try again. Let us know if that helps.

working on that now and will let you know if i'm able to get through a search. thanks!

mordant80 commented 1 month ago

Try commenting out line 101 in subsyncer.py (raise OSError) and then restart Bazarr and try again. Let us know if that helps.

that seems to do the trick. search still running.

morpheus65535 commented 1 month ago

@JaiZed any action to take here?

JaiZed commented 1 month ago

@JaiZed any action to take here?

Is it too early to say "no news...good news"?

morpheus65535 commented 1 month ago

Should be fixed in upcoming beta.

mordant80 commented 1 month ago

still fine for me after commenting out that line. thanks guys