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.78k stars 218 forks source link

Not able to save subtitle #1346

Closed eeyoredk2 closed 3 years ago

eeyoredk2 commented 3 years ago

Bazarr v0.9.4-beta.7

Hi After updating, bazarr is not able to download subtitles, and I get the following error in the log:

(filename replaced with XXXXXXXXXXXX)

BAZARR Error saving Subtitles file to disk for this file:/media/shares/XXXXXXXXXXXX: ValueError('not enough values to unpack (expected 2, got 1)')

Traceback (most recent call last):   File "/opt/bazarr/bazarr/get_subtitle.py", line 211, in download_subtitle     saved_subtitles = save_subtitles(video.original_path, subtitles, single=single,   File "/opt/bazarr/bazarr/../libs/subliminal_patch/core.py", line 917, in save_subtitles     content = subtitle.get_modified_content(format=format, debug=debug_mods)   File "/opt/bazarr/bazarr/../libs/subliminal_patch/subtitle.py", line 389, in get_modified_content     submods.modify(self.mods)   File "/opt/bazarr/bazarr/../libs/subzero/modification/main.py", line 215, in modify     line_mods, non_line_mods, mods_used = self.prepare_mods(mods)   File "/opt/bazarr/bazarr/../libs/subzero/modification/main.py", line 85, in prepare_mods     parsed_mods = [(SubtitleModifications.parse_identifier(mod), mod) for mod in mods]   File "/opt/bazarr/bazarr/../libs/subzero/modification/main.py", line 85, in     parsed_mods = [(SubtitleModifications.parse_identifier(mod), mod) for mod in mods]   File "/opt/bazarr/bazarr/../libs/subzero/modification/main.py", line 72, in parse_identifier     args = dict((key, value) for key, value in [sub.split("=") for sub in split_args])   File "/opt/bazarr/bazarr/../libs/subzero/modification/main.py", line 72, in     args = dict((key, value) for key, value in [sub.split("=") for sub in split_args]) ValueError: not enough values to unpack (expected 2, got 1)

morpheus65535 commented 3 years ago

Try to disable mods in Settings-->Subtitles, save settings, then re-enable them and save again. I didn't had mods enabled but when I do, I don't have any issue.

eeyoredk2 commented 3 years ago

Disabling mods in subtitles and saving resulted in subtitles being saved. Unfortunately the subtitle settings page is now blank without any information at all and it is still blank after restart of Bazarr and the VM it is running in. It happend on both my Bazarr VM's so it is not an isolated incident.

morpheus65535 commented 3 years ago

Can you provide one of your config.ini file after corruption? You can share it with me over PM on Discord.

eeyoredk2 commented 3 years ago

I think that I found the cause. Removing OCR_fixes from subzero_mods in the config.ini and restarting Bazarr, allowed me to enter the subtitle settings page again. After that everything works perfectly until I re-enable OCR Fixes, then I am back to the original error. I have disabled it for now.

morpheus65535 commented 3 years ago

In fact, as soon as there's a mod enabled (only one) it broke because there's no comma to split the string.

morpheus65535 commented 3 years ago

It's now fixed and will be working in next nightly.

bphd commented 1 year ago

I have :: bazarr[]: -- ::, - root () : INFO (get_providers:303) - Throttling addic7ed for 10 minutes, until // :, because of: ValueError. Exception info: 'not enough values to unpack (expected 2, got 1)' after putting PHPSESSID: in Settings > Providers > Addic7ed > Cookies, e.g., PHPSESSID=abc; wikisubtitlesuser=xyz; wikisubtitlespass=efg. Before that I've had :: bazarr[]: -- ::, - root () : INFO (get_providers:303) - Throttling addic7ed for 10 minutes, until // :, because of: Exception. Exception info: 'AntiCaptcha class not given, exiting'

morpheus65535 commented 1 year ago

@bphd this is addic7ed and you shouldn't use both username/password and phpsessionid. It's one or the other. If you choose username/password, you need an anti-captcha provider.

bphd commented 1 year ago

It should be written somewhere on the interface. Or just a switch system that toggle one form or the other

morpheus65535 commented 1 year ago

@bphd feel free to create a feature request or, even better, submit a pull request with the required changes! 😄