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.67k stars 211 forks source link

Guessit exception #1858

Closed isidornygren closed 2 years ago

isidornygren commented 2 years ago

Describe the bug Most (if not all) of my files fails during checking. Seems to be something going on with Guessit. However, when I run Guessit manually on the afflicted files, it returns a correct guess. Therefore, I'm not sure that this is an issue directly tied to Guessit.

Screenshots

Software (please complete the following information):

Additional context Logfile:

trying to get video information for this file: /mnt/data/media/series/The Terror (2018) [imdbid-tt2708480]/Season 02/The Terror S02E02 [WEBDL-1080p][AAC 2.0][h264]-TBS.mkv|'Traceback (most recent call last):  File "/usr/lib/bazarr/bazarr/../libs/guessit/api.py", line 209, in guessit
    matches = self.rebulk.matches(string, options)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rebulk.py", line 115, in matches
    self._execute_rules(matches, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rebulk.py", line 146, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 312, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 337, in execute_rule
    rule.then(matches, when_response, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 118, in then
    cons.then(matches, next(iterator), context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 200, in then
    removed = self.remove.then(matches, when_response, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 136, in then
    matches.remove(match)
  File "/usr/lib/python3.10/_collections_abc.py", line 1158, in remove
    del self[self.index(value)]
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/match.py", line 554, in __delitem__
    self._remove_match(match)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/match.py", line 129, in _remove_match
    _BaseMatches._base_remove(self._tag_dict[tag], match)
ValueError: list.remove(x): x not in list

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/bazarr/bazarr/get_subtitle/utils.py", line 39, in get_video
    video = parse_video(path, hints=hints, providers=providers, dry_run=used_scene_name,
  File "/usr/lib/bazarr/bazarr/../libs/subzero/video.py", line 61, in parse_video
    return scan_video(fn, hints=hints, dont_use_actual_file=dry_run, providers=providers,
  File "/usr/lib/bazarr/bazarr/../libs/subliminal_patch/core.py", line 710, in scan_video
    guessed_result = guessit(guess_from, options=hints)
  File "/usr/lib/bazarr/bazarr/../libs/guessit/api.py", line 74, in guessit
    return default_api.guessit(string, options)
  File "/usr/lib/bazarr/bazarr/../libs/guessit/api.py", line 225, in guessit
    raise GuessitException(string, options) from err
guessit.api.GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=3.4.3
string=The Terror (2018) [imdbid-tt2708480]/Season 02/The.Terror.S02E02.1080p.WEB.h264-TBS.mkv
options={\'expected_title\': [\'OSS 117\', \'This is Us\', \'The Terror\'], \'allowed_countries\': [\'au\', \'gb\', \'us\'], \'allowed_languages\': [\'ca\', \'cs\', \'de\', \'en\', \'es\', \'fr\', \'he\', \'hi\', \'hu\', \'it\', \'ja\', \'ko\', \'mul\', \'nl\', \'no\', \'pl\', \'pt\', \'ro\', \'ru\', \'sv\', \'te\', \'uk\', \'und\'], \'advanced_config\': {\'common_words\': [\'ca\', \'cat\', \'de\', \'he\', \'it\', \'no\', \'por\', \'rum\', \'se\', \'st\', \'sub\'], \'groups\': {\'starting\': \'([{\', \'ending\': \')]}\'}, \'audio_codec\': {\'audio_codec\': {\'MP3\': {\'string\': [\'MP3\', \'LAME\'], \'regex\': [\'LAME(?:\\\\d)+-?(?:\\\\d)+\']}, \'MP2\': \'MP2\', \'Dolby Digital\': {\'string\': [\'Dolby\', \'DolbyDigital\'], \'regex\': [\'Dolby-Digital\', \'DD\', \'AC3D?\']}, \'Dolby Atmos\': {\'string\': [\'Atmos\'], \'regex\': [\'Dolby-?Atmos\']}, \'AAC\': \'AAC\', \'Dolby Digital Plus\': [\'EAC3\', \'DDP\', \'DD+\'], \'FLAC\': \'Flac\', \'DTS\': \'DTS\', \'DTS-HD\': {\'regex\': [\'DTS-?HD\', \'DTS(?=-?MA)\'], \'conflict_solver\': "lambda match, other: other if other.name == \'audio_codec\' else \'__default__\'"}, \'Dolby TrueHD\': {\'regex\': [\'True-?HD\']}, \'Opus\': \'Opus\', \'Vorbis\': \'Vorbis\', \'PCM\': \'PCM\', \'LPCM\': \'LPCM\'}, \'audio_channels\': {\'1.0\': [\'1ch\', \'mono\', \'re:(1[\\\\W_]0(?:ch)?)(?=[^\\\\d]|$)\'], \'2.0\': [\'2ch\', \'stereo\', {\'regex\': \'(2[\\\\W_]0(?:ch)?)(?=[^\\\\d]|$)\', \'children\': True}, {\'string\': \'20\', \'validator\': \'import:seps_after\', \'tags\': \'weak-audio_channels\'}], \'5.1\': [\'5ch\', \'6ch\', {\'regex\': \'(5[\\\\W_][01](?:ch)?)(?=[^\\\\d]|$)\', \'children\': True}, {\'regex\': \'(6[\\\\W_]0(?:ch)?)(?=[^\\\\d]|$)\', \'children\': True}, {\'regex\': \'5[01]\', \'validator\': \'import:seps_after\', \'tags\': \'weak-audio_channels\'}], \'7.1\': [\'7ch\', \'8ch\', {\'regex\': \'(7[\\\\W_][01](?:ch)?)(?=[^\\\\d]|$)\', \'children\': True}, {\'regex\': \'7[01]\', \'validator\': \'import:seps_after\', \'tags\': \'weak-audio_channels\'}]}, \'audio_profile\': {\'Master Audio\': {\'string\': \'MA\', \'tags\': [\'audio_profile.rule\', \'DTS-HD\']}, \'High Resolution Audio\': {\'string\': [\'HR\', \'HRA\'], \'tags\': [\'audio_profile.rule\', \'DTS-HD\']}, \'Extended Surround\': {\'string\': \'ES\', \'tags\': [\'audio_profile.rule\', \'DTS\']}, \'High Efficiency\': {\'string\': \'HE\', \'tags\': [\'audio_profile.rule\', \'AAC\']}, \'Low Complexity\': {\'string\': \'LC\', \'tags\': [\'audio_profile.rule\', \'AAC\']}, \'High Quality\': {\'string\': \'HQ\', \'tags\': [\'audio_profile.rule\', \'Dolby Digital\']}, \'EX\': {\'string\': \'EX\', \'tags\': [\'audio_profile.rule\', \'Dolby Digital\']}}}, \'bit_rate\': {\'bit_rate\': {\'_\': {\'regex\': [\'\\\\d+-?[kmg]b(ps|its?)\', \'\\\\d+\\\\.\\\\d+-?[kmg]b(ps|its?)\'], \'conflict_solver\': "lambda match, other: match if other.name == \'audio_channels\' and \'weak-audio_channels\' not in other.tags else other", \'formatter\': \'import:guessit.rules.common.quantity:BitRate.fromstring\', \'tags\': [\'release-group-prefix\']}}}, \'bonus\': {\'bonus\': {\'_\': {\'regex\': \'x(\\\\d+)\', \'private_parent\': True, \'children\': True, \'formatter\': \'eval:int\', \'validator\': {\'__parent__\': \'import:seps_surround\'}, \'validate_all\': True, \'conflict_solver\': "lambda match, conflicting: match if conflicting.name in (\'video_codec\', \'episode\') and \'weak-episode\' not in conflicting.tags else \'__default__\'"}}}, \'cd\': {\'_cd_of_cd_count\': {\'regex\': \'cd-?(?P<cd>\\\\d+)(?:-?of-?(?P<cd_count>\\\\d+))?\', \'validator\': {\'cd\': \'lambda match: 0 < match.value < 100\', \'cd_count\': \'lambda match: 0 < match.value < 100\'}, \'formatter\': {\'cd\': \'eval:int\', \'cd_count\': \'eval:int\'}, \'children\': True, \'private_parent\': True, \'properties\': {\'cd\': [None], \'cd_count\': [None]}}, \'_cd_count\': {\'regex\': \'(?P<cd_count>\\\\d+)-?cds?\', \'validator\': {\'cd\': \'lambda match: 0 < match.value < 100\', \'cd_count\': \'lambda match: 0 < match.value < 100\'}, \'formatter\': {\'cd_count\': \'eval:int\'}, \'children\': True, \'private_parent\': True, \'properties\': {\'cd\': [None], \'cd_count\': [None]}}}, \'container\': {\'subtitles\': [\'srt\', \'idx\', \'sub\', \'ssa\', \'ass\'], \'info\': [\'nfo\'], \'videos\': [\'3g2\', \'3gp\', \'3gp2\', \'asf\', \'avi\', \'divx\', \'flv\', \'iso\', \'m4v\', \'mk2\', \'mk3d\', \'mka\', \'mkv\', \'mov\', \'mp4\', \'mp4a\', \'mpeg\', \'mpg\', \'ogg\', \'ogm\', \'ogv\', \'qt\', \'ra\', \'ram\', \'rm\', \'ts\', \'vob\', \'wav\', \'webm\', \'wma\', \'wmv\'], \'torrent\': [\'torrent\'], \'nzb\': [\'nzb\']}, \'country\': {\'synonyms\': {\'ES\': [\'españa\'], \'GB\': [\'UK\'], \'BR\': [\'brazilian\', \'bra\'], \'CA\': [\'québec\', \'quebec\', \'qc\'], \'MX\': [\'Latinoamérica\', \'latin america\']}}, \'edition\': {\'edition\': {\'Collector\': {\'string\': [\'collector\'], \'regex\': ["collector\'?s?-edition", \'edition-collector\']}, \'Special\': [{\'regex\': [\'special-edition\', \'edition-special\'], \'conflict_solver\': "lambda match, other: other if other.name == \'episode_details\' and other.value == \'Special\' else \'__default__\'"}, {\'string\': \'se\', \'tags\': \'has-neighbor\'}], "Director\'s Definitive Cut": \'ddc\', \'Criterion\': {\'string\': [\'CC\', \'Criterion\'], \'regex\': [\'criterion-edition\', \'edition-criterion\']}, \'Deluxe\': {\'string\': [\'deluxe\'], \'regex\': [\'deluxe-edition\', \'edition-deluxe\']}, \'Limited\': {\'string\': [\'limited\'], \'regex\': [\'limited-edition\'], \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Theatrical\': {\'string\': [\'theatrical\'], \'regex\': [\'theatrical-cut\', \'theatrical-edition\']}, "Director\'s Cut": {\'string\': [\'DC\'], \'regex\': ["director\'?s?-cut", "director\'?s?-cut-edition", "edition-director\'?s?-cut"]}, \'Extended\': {\'string\': [\'extended\'], \'regex\': [\'extended-?cut\', \'extended-?version\'], \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Alternative Cut\': {\'regex\': [\'alternat(e|ive)(?:-?Cut)?\'], \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Remastered\': [{\'string\': \'Remastered\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, {\'regex\': \'4k-remaster(?:ed)?\', \'tags\': [\'release-group-prefix\']}], \'Restored\': [{\'string\': \'Restored\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, {\'regex\': \'4k-restore(?:d)?\', \'tags\': [\'release-group-prefix\']}], \'Uncensored\': {\'string\': \'Uncensored\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Uncut\': {\'string\': \'Uncut\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Unrated\': {\'string\': \'Unrated\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Festival\': {\'string\': \'Festival\', \'tags\': [\'has-neighbor-before\', \'has-neighbor-after\']}, \'IMAX\': {\'string\': [\'imax\'], \'regex\': [\'imax-edition\']}, \'Fan\': {\'regex\': [\'fan-edit(?:ion)?\', \'fan-collection\']}, \'Ultimate\': {\'regex\': [\'ultimate-edition\']}, \'_Ultimate_Collector\': {\'regex\': ["ultimate-collector\'?s?-edition"], \'value\': [\'Ultimate\', \'Collector\']}, \'_Ultimate_Fan\': {\'regex\': [\'ultimate-fan-edit(?:ion)?\', \'ultimate-fan-collection\'], \'value\': [\'Ultimate\', \'Fan\']}}}, \'episodes\': {\'season_max_range\': 100, \'episode_max_range\': 100, \'max_range_gap\': 1, \'season_markers\': [\'s\'], \'season_ep_markers\': [\'x\'], \'disc_markers\': [\'d\'], \'episode_markers\': [\'xe\', \'ex\', \'ep\', \'e\', \'x\'], \'range_separators\': [\'-\', \'~\', \'to\', \'a\'], \'discrete_separators\': [\'+\', \'&\', \'and\', \'et\'], \'season_words\': [\'season\', \'saison\', \'seizoen\', \'seasons\', \'saisons\', \'tem\', \'temp\', \'temporada\', \'temporadas\', \'stagione\'], \'episode_words\': [\'episode\', \'episodes\', \'eps\', \'ep\', \'episodio\', \'episodios\', \'capitulo\', \'capitulos\'], \'of_words\': [\'of\', \'sur\'], \'all_words\': [\'All\']}, \'film\': {\'film\': {\'_f\': {\'regex\': \'f(\\\\d{1,2})\', \'name\': \'film\', \'validate_all\': True, \'validator\': {\'__parent__\': \'import:seps_surround\'}, \'private_parent\': True, \'children\': True, \'formatter\': \'eval:int\'}}}, \'language\': {\'synonyms\': {\'ell\': [\'gr\', \'greek\'], \'spa\': [\'esp\', \'español\', \'espanol\'], \'fra\': [\'français\', \'vf\', \'vff\', \'vfi\', \'vfq\'], \'swe\': [\'se\'], \'por_BR\': [\'po\', \'pb\', \'pob\', \'ptbr\', \'br\', \'brazilian\'], \'deu_CH\': [\'swissgerman\', \'swiss german\'], \'nld_BE\': [\'flemish\'], \'cat\': [\'català\', \'castellano\', \'espanol castellano\', \'español castellano\'], \'ces\': [\'cz\'], \'ukr\': [\'ua\'], \'zho\': [\'cn\'], \'jpn\': [\'jp\'], \'hrv\': [\'scr\'], \'mul\': [\'multi\', \'multiple\', \'dl\']}, \'subtitle_affixes\': [\'sub\', \'subs\', \'subtitle\', \'subtitles\', \'esub\', \'esubs\', \'subbed\', \'custom subbed\', \'custom subs\', \'custom sub\', \'customsubbed\', \'customsubs\', \'customsub\', \'soft subtitles\', \'soft subs\'], \'subtitle_prefixes\': [\'st\', \'vost\', \'subforced\', \'fansub\', \'hardsub\', \'legenda\', \'legendas\', \'legendado\', \'subtitulado\', \'soft\'], \'subtitle_suffixes\': [\'subforced\', \'fansub\', \'hardsub\'], \'language_affixes\': [\'dublado\', \'dubbed\', \'dub\'], \'language_prefixes\': [\'true\'], \'language_suffixes\': [\'audio\'], \'weak_affixes\': [\'v\', \'audio\', \'true\']}, \'other\': {\'other\': {\'Audio Fixed\': {\'regex\': [\'Audio-?Fix\', \'Audio-?Fixed\']}, \'Sync Fixed\': {\'regex\': [\'Sync-?Fix\', \'Sync-?Fixed\']}, \'Dual Audio\': {\'string\': [\'Dual\'], \'regex\': [\'Dual-?Audio\']}, \'Widescreen\': {\'string\': [\'ws\'], \'regex\': [\'wide-?screen\']}, \'Reencoded\': {\'regex\': [\'Re-?Enc(?:oded)?\']}, \'_repack_with_count\': {\'regex\': [\'Repack(?P<proper_count>\\\\d*)\', \'Rerip(?P<proper_count>\\\\d*)\'], \'value\': {\'other\': \'Proper\'}, \'tags\': [\'streaming_service.prefix\', \'streaming_service.suffix\']}, \'Proper\': [{\'string\': \'Proper\', \'tags\': [\'has-neighbor\', \'streaming_service.prefix\', \'streaming_service.suffix\']}, {\'regex\': [\'Real-Proper\', \'Real-Repack\', \'Real-Rerip\'], \'tags\': [\'streaming_service.prefix\', \'streaming_service.suffix\', \'real\']}, {\'string\': \'Real\', \'tags\': [\'has-neighbor\', \'streaming_service.prefix\', \'streaming_service.suffix\', \'real\']}], \'Fix\': [{\'string\': [\'Fix\', \'Fixed\'], \'tags\': [\'has-neighbor-before\', \'has-neighbor-after\', \'streaming_service.prefix\', \'streaming_service.suffix\']}, {\'string\': [\'Dirfix\', \'Nfofix\', \'Prooffix\'], \'tags\': [\'streaming_service.prefix\', \'streaming_service.suffix\']}, {\'regex\': [\'(?:Proof-?)?Sample-?Fix\'], \'tags\': [\'streaming_service.prefix\', \'streaming_service.suffix\']}], \'Fan Subtitled\': {\'string\': \'Fansub\', \'tags\': \'has-neighbor\'}, \'Fast Subtitled\': {\'string\': \'Fastsub\', \'tags\': \'has-neighbor\'}, \'Region 5\': \'R5\', \'Region C\': \'RC\', \'Preair\': {\'regex\': \'Pre-?Air\'}, \'PS Vita\': [{\'regex\': \'(?:PS-?)Vita\'}, {\'string\': \'Vita\', \'tags\': \'has-neighbor\'}], \'_HdRip\': {\'value\': {\'other\': \'HD\', \'another\': \'Rip\'}, \'regex\': [\'(HD)(?P<another>Rip)\'], \'private_parent\': True, \'children\': True, \'validator\': {\'__parent__\': \'import:seps_surround\'}, \'validate_all\': True}, \'Screener\': [\'Screener\', {\'regex\': \'Scr(?:eener)?\', \'validator\': None, \'tags\': [\'other.validate.screener\', \'source-prefix\', \'source-suffix\']}], \'Remux\': \'Remux\', \'Hybrid\': \'Hybrid\', \'PAL\': \'PAL\', \'SECAM\': \'SECAM\', \'NTSC\': \'NTSC\', \'XXX\': \'XXX\', \'2in1\': \'2in1\', \'3D\': {\'string\': \'3D\', \'tags\': \'has-neighbor\'}, \'High Quality\': {\'string\': \'HQ\', \'tags\': \'uhdbluray-neighbor\'}, \'High Resolution\': \'HR\', \'Line Dubbed\': \'LD\', \'Mic Dubbed\': \'MD\', \'Micro HD\': [\'mHD\', \'HDLight\'], \'Low Definition\': \'LDTV\', \'High Frame Rate\': \'HFR\', \'Variable Frame Rate\': \'VFR\', \'HD\': {\'string\': \'HD\', \'validator\': None, \'tags\': [\'streaming_service.prefix\', \'streaming_service.suffix\']}, \'Full HD\': {\'string\': [\'FHD\'], \'regex\': [\'Full-?HD\'], \'validator\': None, \'tags\': [\'streaming_service.prefix\', \'streaming_service.suffix\']}, \'Ultra HD\': {\'string\': [\'UHD\'], \'regex\': [\'Ultra-?(?:HD)?\'], \'validator\': None, \'tags\': [\'streaming_service.prefix\', \'streaming_service.suffix\']}, \'Upscaled\': {\'regex\': \'Upscaled?\'}, \'Complete\': {\'string\': [\'Complet\', \'Complete\'], \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Classic\': {\'string\': \'Classic\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Bonus\': {\'string\': \'Bonus\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Trailer\': {\'string\': \'Trailer\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Retail\': {\'string\': \'Retail\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Colorized\': {\'string\': \'Colorized\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Internal\': {\'string\': \'Internal\', \'tags\': [\'has-neighbor\', \'release-group-prefix\']}, \'Line Audio\': {\'string\': \'LiNE\', \'tags\': [\'has-neighbor-before\', \'has-neighbor-after\', \'release-group-prefix\']}, \'Read NFO\': {\'regex\': \'Read-?NFO\'}, \'Converted\': {\'string\': \'CONVERT\', \'tags\': \'has-neighbor\'}, \'Documentary\': {\'string\': [\'DOCU\', \'DOKU\'], \'tags\': \'has-neighbor\'}, \'Open Matte\': {\'regex\': \'(?:OM|Open-?Matte)\', \'tags\': \'has-neighbor\'}, \'Straight to Video\': {\'string\': \'STV\', \'tags\': \'has-neighbor\'}, \'Original Aspect Ratio\': {\'string\': \'OAR\', \'tags\': \'has-neighbor\'}, \'East Coast Feed\': {\'regex\': \'(?:Live-)?(?:Episode-)?East-?(?:Coast-)?Feed\'}, \'West Coast Feed\': {\'regex\': \'(?:Live-)?(?:Episode-)?West-?(?:Coast-)?Feed\'}, \'Original Video\': {\'string\': [\'VO\', \'OV\'], \'tags\': \'has-neighbor\'}, \'Original Animated Video\': {\'string\': [\'Ova\', \'Oav\']}, \'Original Net Animation\': \'Ona\', \'Original Animation DVD\': \'Oad\', \'Mux\': {\'string\': \'Mux\', \'validator\': \'import:seps_after\', \'tags\': [\'other.validate.mux\', \'video-codec-prefix\', \'source-suffix\']}, \'Hardcoded Subtitles\': [\'HC\', \'vost\'], \'Standard Dynamic Range\': {\'string\': \'SDR\', \'tags\': \'uhdbluray-neighbor\'}, \'HDR10\': {\'regex\': \'HDR(?:10)?\', \'tags\': \'uhdbluray-neighbor\'}, \'Dolby Vision\': {\'regex\': \'Dolby-?Vision\', \'tags\': \'uhdbluray-neighbor\'}, \'BT.2020\': {\'regex\': \'BT-?2020\', \'tags\': \'uhdbluray-neighbor\'}, \'Sample\': {\'string\': \'Sample\', \'tags\': [\'at-end\', \'not-a-release-group\']}, \'Extras\': [{\'string\': \'Extras\', \'tags\': \'has-neighbor\'}, {\'regex\': \'Digital-?Extras?\'}], \'Proof\': {\'string\': \'Proof\', \'tags\': [\'at-end\', \'not-a-release-group\']}, \'Obfuscated\': {\'string\': [\'Obfuscated\', \'Scrambled\'], \'tags\': [\'at-end\', \'not-a-release-group\']}, \'Repost\': {\'string\': [\'xpost\', \'postbot\', \'asrequested\'], \'tags\': \'not-a-release-group\'}, \'_complete_words\': {\'callable\': \'import:guessit.rules.properties.other:complete_words\', \'season_words\': [\'seasons?\', \'series?\'], \'complete_article_words\': [\'The\']}}}, \'part\': {\'prefixes\': [\'pt\', \'part\']}, \'release_group\': {\'forbidden_names\': [\'bonus\', \'by\', \'for\', \'par\', \'pour\', \'rip\'], \'ignored_seps\': \'[]{}()\'}, \'screen_size\': {\'frame_rates\': [\'23\\\\.976\', \'24(?:\\\\.0{1,3})?\', \'25(?:\\\\.0{1,3})?\', \'29\\\\.970\', \'30(?:\\\\.0{1,3})?\', \'48(?:\\\\.0{1,3})?\', \'50(?:\\\\.0{1,3})?\', \'60(?:\\\\.0{1,3})?\', \'120(?:\\\\.0{1,3})?\'], \'min_ar\': 1.333, \'max_ar\': 1.898, \'interlaced\': [\'360\', \'480\', \'540\', \'576\', \'900\', \'1080\'], \'progressive\': [\'360\', \'480\', \'540\', \'576\', \'900\', \'1080\', \'368\', \'720\', \'1440\', \'2160\', \'4320\']}, \'source\': {\'rip_prefix\': \'(?P<other>Rip)-?\', \'rip_suffix\': \'-?(?P<other>Rip)\'}, \'website\': {\'safe_tlds\': [\'com\', \'net\', \'org\'], \'safe_subdomains\': [\'www\'], \'safe_prefixes\': [\'co\', \'com\', \'net\', \'org\'], \'prefixes\': [\'from\']}, \'streaming_service\': {\'9Now\': \'9NOW\', \'A&E\': [\'AE\', \'A&E\'], \'ABC\': \'AMBC\', \'ABC Australia\': \'AUBC\', \'Al Jazeera English\': \'AJAZ\', \'AMC\': \'AMC\', \'Amazon Prime\': [\'AMZN\', \'Amazon\', \'re:Amazon-?Prime\'], \'Adult Swim\': [\'AS\', \'re:Adult-?Swim\'], "America\'s Test Kitchen": \'ATK\', \'Animal Planet\': \'ANPL\', \'AnimeLab\': \'ANLB\', \'AOL\': \'AOL\', \'AppleTV\': [\'ATVP\', \'ATV+\', \'APTV\'], \'ARD\': \'ARD\', \'BBC iPlayer\': [\'iP\', \'re:BBC-?iPlayer\'], \'Binge\': \'BNGE\', \'Blackpills\': \'BKPL\', \'BluTV\': \'BLU\', \'Boomerang\': \'BOOM\', \'Disney+\': \'DSNP\', \'BravoTV\': \'BRAV\', \'Canal+\': \'CNLP\', \'Cartoon Network\': \'CN\', \'CBC\': \'CBC\', \'CBS\': \'CBS\', \'CNBC\': \'CNBC\', \'Comedy Central\': [\'CC\', \'re:Comedy-?Central\'], \'Channel 4\': [\'ALL4\', \'4OD\'], \'CHRGD\': \'CHGD\', \'Cinemax\': \'CMAX\', \'Country Music Television\': \'CMT\', \'Comedians in Cars Getting Coffee\': \'CCGC\', \'Crave\': \'CRAV\', \'Crunchy Roll\': [\'CR\', \'re:Crunchy-?Roll\'], \'Crackle\': \'CRKL\', \'CSpan\': \'CSPN\', \'CTV\': \'CTV\', \'CuriosityStream\': \'CUR\', \'CWSeed\': \'CWS\', \'Daisuki\': \'DSKI\', \'DC Universe\': \'DCU\', \'Deadhouse Films\': \'DHF\', \'DramaFever\': [\'DF\', \'DramaFever\'], \'Digiturk Diledigin Yerde\': \'DDY\', \'Discovery\': [\'DISC\', \'Discovery\'], \'Discovery Plus\': \'DSCP\', \'Disney\': [\'DSNY\', \'Disney\'], \'DIY Network\': \'DIY\', \'Doc Club\': \'DOCC\', \'DPlay\': \'DPLY\', \'E!\': \'ETV\', \'ePix\': \'EPIX\', \'El Trece\': \'ETTV\', \'ESPN\': \'ESPN\', \'Esquire\': \'ESQ\', \'Facebook Watch\': \'FBWatch\', \'Family\': \'FAM\', \'Family Jr\': \'FJR\', \'Fandor\': \'FANDOR\', \'Food Network\': \'FOOD\', \'Fox\': \'FOX\', \'Fox Premium\': \'FOXP\', \'Foxtel\': \'FXTL\', \'Freeform\': \'FREE\', \'FYI Network\': \'FYI\', \'GagaOOLala\': \'Gaga\', \'Global\': \'GLBL\', \'GloboSat Play\': \'GLOB\', \'Hallmark\': \'HLMK\', \'HBO Go\': [\'HBO\', \'re:HBO-?Go\'], \'HBO Max\': \'HMAX\', \'HGTV\': \'HGTV\', \'History\': [\'HIST\', \'History\'], \'Hulu\': \'HULU\', \'Investigation Discovery\': \'ID\', \'IFC\': \'IFC\', \'hoichoi\': \'HoiChoi\', \'iflix\': \'IFX\', \'iQIYI\': \'iQIYI\', \'iTunes\': [\'iTunes\', {\'pattern\': \'iT\', \'ignore_case\': False}], \'ITV\': \'ITV\', \'Knowledge Network\': \'KNOW\', \'Lifetime\': \'LIFE\', \'Motor Trend OnDemand\': \'MTOD\', \'MBC\': [\'MBC\', \'MBCVOD\'], \'MSNBC\': \'MNBC\', \'MTV\': \'MTV\', \'MUBI\': \'MUBI\', \'National Audiovisual Institute\': \'INA\', \'National Film Board\': \'NFB\', \'National Geographic\': [\'NATG\', \'re:National-?Geographic\'], \'NBA TV\': [\'NBA\', \'re:NBA-?TV\'], \'NBC\': \'NBC\', \'Netflix\': [\'NF\', \'Netflix\'], \'NFL\': \'NFL\', \'NFL Now\': \'NFLN\', \'NHL GameCenter\': \'GC\', \'Nickelodeon\': [\'NICK\', \'Nickelodeon\', \'NICKAPP\'], \'Norsk Rikskringkasting\': \'NRK\', \'OnDemandKorea\': [\'ODK\', \'OnDemandKorea\'], \'Opto\': \'OPTO\', \'Oprah Winfrey Network\': \'OWN\', \'PBS\': \'PBS\', \'PBS Kids\': \'PBSK\', \'Peacock\': [\'PCOK\', \'Peacock\'], \'Playstation Network\': \'PSN\', \'Pluzz\': \'PLUZ\', \'PokerGO\': \'POGO\', \'Rakuten TV\': \'RKTN\', \'The Roku Channel\': \'ROKU\', \'RTE One\': \'RTE\', \'RUUTU\': \'RUUTU\', \'SBS\': \'SBS\', \'Science Channel\': \'SCI\', \'SeeSo\': [\'SESO\', \'SeeSo\'], \'Shomi\': \'SHMI\', \'Showtime\': \'SHO\', \'Sony\': \'SONY\', \'Spike\': \'SPIK\', \'Spike TV\': [\'SPKE\', \'re:Spike-?TV\'], \'Sportsnet\': \'SNET\', \'Sprout\': \'SPRT\', \'Stan\': \'STAN\', \'Starz\': \'STZ\', \'Sveriges Television\': \'SVT\', \'SwearNet\': \'SWER\', \'Syfy\': \'SYFY\', \'TBS\': \'TBS\', \'TFou\': \'TFOU\', \'The CW\': [\'CW\', \'re:The-?CW\'], \'TLC\': \'TLC\', \'TubiTV\': \'TUBI\', \'TV3 Ireland\': \'TV3\', \'TV4 Sweeden\': \'TV4\', \'TVING\': \'TVING\', \'TV Land\': [\'TVL\', \'re:TV-?Land\'], \'TVNZ\': \'TVNZ\', \'UFC\': \'UFC\', \'UFC Fight Pass\': \'FP\', \'UKTV\': \'UKTV\', \'Univision\': \'UNIV\', \'USA Network\': \'USAN\', \'Velocity\': \'VLCT\', \'VH1\': \'VH1\', \'Viceland\': \'VICE\', \'Viki\': \'VIKI\', \'Vimeo\': \'VMEO\', \'VRV\': \'VRV\', \'W Network\': \'WNET\', \'WatchMe\': \'WME\', \'WWE Network\': \'WWEN\', \'Xbox Video\': \'XBOX\', \'Yahoo\': \'YHOO\', \'YouTube Red\': \'RED\', \'ZDF\': \'ZDF\'}}, \'title\': \'The Terror\', \'type\': \'episode\', \'single_value\': True}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/bazarr/bazarr/../libs/guessit/api.py", line 209, in guessit
    matches = self.rebulk.matches(string, options)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rebulk.py", line 115, in matches
    self._execute_rules(matches, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rebulk.py", line 146, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 312, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 337, in execute_rule
    rule.then(matches, when_response, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 118, in then
    cons.then(matches, next(iterator), context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 200, in then
    removed = self.remove.then(matches, when_response, context)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/rules.py", line 136, in then
    matches.remove(match)
  File "/usr/lib/python3.10/_collections_abc.py", line 1158, in remove
    del self[self.index(value)]
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/match.py", line 554, in __delitem__
    self._remove_match(match)
  File "/usr/lib/bazarr/bazarr/../libs/rebulk/match.py", line 129, in _remove_match
    _BaseMatches._base_remove(self._tag_dict[tag], match)
ValueError: list.remove(x): x not in list
--------------------------------------------------------------------
Please report at https://github.com/guessit-io/guessit/issues.
===================================================================='|
morpheus65535 commented 2 years ago

@vitiko98 did you had time to look into this one?

vitiko98 commented 2 years ago

My theory: this bug is impossible to reproduce by just running guessit CLI because is a product of preliminary guessit runs during bazarr runtime; thus, the only way to try to reproduce it is by knowing the source of previous runs.

Please send me your Bazarr database (located at data/db) to averroista@protonmail.com

morpheus65535 commented 2 years ago

@vitiko98 could it be related to some old garbage here that didn't age well when we move from Python 2.7 to 3.x?

https://github.com/morpheus65535/bazarr/blob/development/libs/subliminal_patch/core.py#L743-L758

I'm not even sure it's required... we could simply parse the actual file path with guessit.

vitiko98 commented 2 years ago

@vitiko98 could it be related to some old garbage here that didn't age well when we move from Python 2.7 to 3.x?

https://github.com/morpheus65535/bazarr/blob/development/libs/subliminal_patch/core.py#L743-L758

I'm not even sure it's required... we could simply parse the actual file path with guessit.

It could be. Neither do I believe that code block is required anymore.

OP already sent me the database. I'll try to reproduce the bug within the next hours

beaverly72 commented 2 years ago

Having the same issue on v1.0.4

BAZARR Error (An internal error has occured in guessit.===================== Guessit Exception Report =====================version=3.4.3string=The Boys (2019) [tvdb-355567]/Season 2/The Boys S02E06 The Bloody Doors Off 1080p AMZN WEB-DL DDP5 1 H 264-NTb.mkvoptions={'expected_title': ['OSS 117', 'This is Us', 'The Boys'], 'allowed_countries': ['au', 'gb', 'us'], 'allowed_languages': ['ca', 'cs', 'de', 'en', 'es', 'fr', 'he', 'hi', 'hu', 'it', 'ja', 'ko', 'mul', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sv', 'te', 'uk', 'und'], 'advanced_config': {'common_words': ['ca', 'cat', 'de', 'he', 'it', 'no', 'por', 'rum', 'se', 'st', 'sub'], 'groups': {'starting': '([{', 'ending': ')]}'}, 'audio_codec': {'audio_codec': {'MP3': {'string': ['MP3', 'LAME'], 'regex': ['LAME(?:\d)+-?(?:\d)+']}, 'MP2': 'MP2', 'Dolby Digital': {'string': ['Dolby', 'DolbyDigital'], 'regex': ['Dolby-Digital', 'DD', 'AC3D?']}, 'Dolby Atmos': {'string': ['Atmos'], 'regex': ['Dolby-?Atmos']}, 'AAC': 'AAC', 'Dolby Digital Plus': ['EAC3', 'DDP', 'DD+'], 'FLAC': 'Flac', 'DTS': 'DTS', 'DTS-HD': {'regex': ['DTS-?HD', 'DTS(?=-?MA)'], 'conflict_solver': "lambda match, other: other if other.name == 'audio_codec' else 'default'"}, 'Dolby TrueHD': {'regex': ['True-?HD']}, 'Opus': 'Opus', 'Vorbis': 'Vorbis', 'PCM': 'PCM', 'LPCM': 'LPCM'}, 'audiochannels': {'1.0': ['1ch', 'mono', 're:(1[\W]0(?:ch)?)(?=[^\d]

$)'], '2.0': ['2ch', 'stereo', {'regex': '(2[\W_]0(?:ch)?)(?=[^\d]

vitiko98 commented 2 years ago

I hope this bug is gone in the upcoming beta.

beaverly72 commented 2 years ago

I updated to 1.0.5-beta.34. Appears to be resolved.