# Buggy code
def subtitles_enabled(*args):
    """Try to parse names to a show and check whether the show has subtitles enabled.

    :param args:
    :return:
    :rtype: bool
    """
    for name in args:
        try:
            parse_result = NameParser().parse(name, cache_result=True)
            if parse_result.show.indexerid:
                main_db_con = db.DBConnection()
                sql_results = main_db_con.select(
                    "SELECT subtitles FROM tv_shows WHERE indexer_id = ? LIMIT 1",
                    [parse_result.show.indexerid],
                )
                return bool(sql_results[0]["subtitles"]) if sql_results else False

            logger.log("Empty indexer ID for: {name}".format(name=name), logger.WARNING)
        except (InvalidNameException, InvalidShowException):
            logger.log(
                "Not enough information to parse filename into a valid show. Consider adding scene exceptions "
                "or improve naming for: {name}".format(name=name),
                logger.WARNING,
            )
    return False


# Traceback (AttributeError)
2016-09-12 22:29:42 INFO     Thread-21 :: [9c6346b] PostProcessing Path: C:\Users\uTorrentVM\Downloads\Complete\SB
2016-09-12 22:29:44 ERROR    Thread-21 :: [9c6346b] Failed doing web ui callback: Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\core\base.py", line 270, in async_call
    result = function(**kwargs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\home\post_process.py", line 50, in processEpisode
    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), proc_type=type, ignore_subs=argToBool(ignore_subs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 303, in processDir
    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, ignore_subs, result)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 571, in process_media
    if already_postprocessed(processPath, cur_video_file, force, result):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 531, in already_postprocessed
    parse_result = NameParser(try_indexers=True).parse(dirName)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 235, in parse
    result = self._parse_string(name)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 62, in _parse_string
    guess = guessit.guessit(name, dict(show_type=self.show_type))
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\guessit_parser.py", line 99, in guessit
    return default_api.guessit(name, options=final_options)
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 113, in guessit
    raise GuessitException(string, options)
GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=2.1.0.dev0
string=C:\Users\uTorrentVM\Downloads\Complete\SB\[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_mkv_[5_7]_-_`[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_vol03+04_par2`
options={'allowed_languages': ['ru', 'hu', 'en', 'nl', 'pt', 'de', 'jp', 'sv', 'it', 'fr', 'es', 'uk', 'ro', 'pl', 'he'], 'expected_group': ['re:\\bCDD\\b', 're:\\bF4ST3R\\b', 're:\\bTGNF4ST\\b', 're:\\bNovaRip\\b', 're:\\bRiPRG\\b', 're:\\bPtM\\b', 're:\\bbyEMP\\b', 're:\\b4EVERHD\\b', 're:\\bPOURMOi\\b', 're:\\bPARTiCLE\\b', 're:\\bTV2LAX9\\b', 're:\\bCDP\\b', 're:\\bELITETORRENT\\b', 're:\\bRipPourBox\\b', 're:\\bF4ST\\b', 're:\\bHDD\\b'], 'expected_title': ['re:(?<![^/\\\\])\\w+ it\\b', 're:\\bMob +Psycho +100\\b'], 'allowed_countries': ['gb', 'us'], 'episode_prefer_number': False, 'show_type': None, 'type': u'episode', 'implicit': True}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 102, in guessit
    matches = self.rebulk.matches(string, options)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 275, in matches
    self._execute_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 306, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 318, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 339, in execute_rule
    when_response = rule.when(matches, context)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\rules\rules.py", line 1006, in when
    predicate=lambda match: (match.name == 'episode' and
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\match.py", line 115, in next
    current = match.start + 1
AttributeError: 'NoneType' object has no attribute 'start'
--------------------------------------------------------------------
Please report at https://github.com/guessit-io/guessit/issues.
====================================================================
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\core\base.py", line 270, in async_call
    result = function(**kwargs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\home\post_process.py", line 50, in processEpisode
    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), proc_type=type, ignore_subs=argToBool(ignore_subs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 303, in processDir
    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, ignore_subs, result)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 571, in process_media
    if already_postprocessed(processPath, cur_video_file, force, result):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 531, in already_postprocessed
    parse_result = NameParser(try_indexers=True).parse(dirName)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 235, in parse
    result = self._parse_string(name)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 62, in _parse_string
    guess = guessit.guessit(name, dict(show_type=self.show_type))
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\guessit_parser.py", line 99, in guessit
    return default_api.guessit(name, options=final_options)
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 113, in guessit
    raise GuessitException(string, options)
GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=2.1.0.dev0
string=C:\Users\uTorrentVM\Downloads\Complete\SB\[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_mkv_[5_7]_-_`[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_vol03+04_par2`
options={'allowed_languages': ['ru', 'hu', 'en', 'nl', 'pt', 'de', 'jp', 'sv', 'it', 'fr', 'es', 'uk', 'ro', 'pl', 'he'], 'expected_group': ['re:\\bCDD\\b', 're:\\bF4ST3R\\b', 're:\\bTGNF4ST\\b', 're:\\bNovaRip\\b', 're:\\bRiPRG\\b', 're:\\bPtM\\b', 're:\\bbyEMP\\b', 're:\\b4EVERHD\\b', 're:\\bPOURMOi\\b', 're:\\bPARTiCLE\\b', 're:\\bTV2LAX9\\b', 're:\\bCDP\\b', 're:\\bELITETORRENT\\b', 're:\\bRipPourBox\\b', 're:\\bF4ST\\b', 're:\\bHDD\\b'], 'expected_title': ['re:(?<![^/\\\\])\\w+ it\\b', 're:\\bMob +Psycho +100\\b'], 'allowed_countries': ['gb', 'us'], 'episode_prefer_number': False, 'show_type': None, 'type': u'episode', 'implicit': True}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 102, in guessit
    matches = self.rebulk.matches(string, options)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 275, in matches
    self._execute_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 306, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 318, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 339, in execute_rule
    when_response = rule.when(matches, context)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\rules\rules.py", line 1006, in when
    predicate=lambda match: (match.name == 'episode' and
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\match.py", line 115, in next
    current = match.start + 1
AttributeError: 'NoneType' object has no attribute 'start'
--------------------------------------------------------------------
Please report at https://github.com/guessit-io/guessit/issues.
====================================================================
2016-09-12 22:30:09 INFO     TORNADO :: [9c6346b] User logged into the Medusa web interface
2016-09-12 22:30:11 INFO     Thread-19 :: [9c6346b] PostProcessing Path: C:\Users\uTorrentVM\Downloads\Complete\sb
2016-09-12 22:30:13 ERROR    Thread-19 :: [9c6346b] Failed doing web ui callback: Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\core\base.py", line 270, in async_call
    result = function(**kwargs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\home\post_process.py", line 50, in processEpisode
    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), proc_type=type, ignore_subs=argToBool(ignore_subs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 303, in processDir
    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, ignore_subs, result)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 571, in process_media
    if already_postprocessed(processPath, cur_video_file, force, result):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 531, in already_postprocessed
    parse_result = NameParser(try_indexers=True).parse(dirName)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 235, in parse
    result = self._parse_string(name)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 62, in _parse_string
    guess = guessit.guessit(name, dict(show_type=self.show_type))
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\guessit_parser.py", line 99, in guessit
    return default_api.guessit(name, options=final_options)
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 113, in guessit
    raise GuessitException(string, options)
GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=2.1.0.dev0
string=C:\Users\uTorrentVM\Downloads\Complete\sb\[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_mkv_[5_7]_-_`[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_vol03+04_par2`
options={'allowed_languages': ['ru', 'hu', 'en', 'nl', 'pt', 'de', 'jp', 'sv', 'it', 'fr', 'es', 'uk', 'ro', 'pl', 'he'], 'expected_group': ['re:\\bCDD\\b', 're:\\bF4ST3R\\b', 're:\\bTGNF4ST\\b', 're:\\bNovaRip\\b', 're:\\bRiPRG\\b', 're:\\bPtM\\b', 're:\\bbyEMP\\b', 're:\\b4EVERHD\\b', 're:\\bPOURMOi\\b', 're:\\bPARTiCLE\\b', 're:\\bTV2LAX9\\b', 're:\\bCDP\\b', 're:\\bELITETORRENT\\b', 're:\\bRipPourBox\\b', 're:\\bF4ST\\b', 're:\\bHDD\\b'], 'expected_title': ['re:(?<![^/\\\\])\\w+ it\\b', 're:\\bMob +Psycho +100\\b'], 'allowed_countries': ['gb', 'us'], 'episode_prefer_number': False, 'show_type': None, 'type': u'episode', 'implicit': True}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 102, in guessit
    matches = self.rebulk.matches(string, options)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 275, in matches
    self._execute_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 306, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 318, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 339, in execute_rule
    when_response = rule.when(matches, context)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\rules\rules.py", line 1006, in when
    predicate=lambda match: (match.name == 'episode' and
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\match.py", line 115, in next
    current = match.start + 1
AttributeError: 'NoneType' object has no attribute 'start'
--------------------------------------------------------------------
Please report at https://github.com/guessit-io/guessit/issues.
====================================================================
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\core\base.py", line 270, in async_call
    result = function(**kwargs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\home\post_process.py", line 50, in processEpisode
    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), proc_type=type, ignore_subs=argToBool(ignore_subs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 303, in processDir
    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, ignore_subs, result)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 571, in process_media
    if already_postprocessed(processPath, cur_video_file, force, result):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 531, in already_postprocessed
    parse_result = NameParser(try_indexers=True).parse(dirName)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 235, in parse
    result = self._parse_string(name)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 62, in _parse_string
    guess = guessit.guessit(name, dict(show_type=self.show_type))
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\guessit_parser.py", line 99, in guessit
    return default_api.guessit(name, options=final_options)
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 113, in guessit
    raise GuessitException(string, options)
GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=2.1.0.dev0
string=C:\Users\uTorrentVM\Downloads\Complete\sb\[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_mkv_[5_7]_-_`[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_vol03+04_par2`
options={'allowed_languages': ['ru', 'hu', 'en', 'nl', 'pt', 'de', 'jp', 'sv', 'it', 'fr', 'es', 'uk', 'ro', 'pl', 'he'], 'expected_group': ['re:\\bCDD\\b', 're:\\bF4ST3R\\b', 're:\\bTGNF4ST\\b', 're:\\bNovaRip\\b', 're:\\bRiPRG\\b', 're:\\bPtM\\b', 're:\\bbyEMP\\b', 're:\\b4EVERHD\\b', 're:\\bPOURMOi\\b', 're:\\bPARTiCLE\\b', 're:\\bTV2LAX9\\b', 're:\\bCDP\\b', 're:\\bELITETORRENT\\b', 're:\\bRipPourBox\\b', 're:\\bF4ST\\b', 're:\\bHDD\\b'], 'expected_title': ['re:(?<![^/\\\\])\\w+ it\\b', 're:\\bMob +Psycho +100\\b'], 'allowed_countries': ['gb', 'us'], 'episode_prefer_number': False, 'show_type': None, 'type': u'episode', 'implicit': True}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 102, in guessit
    matches = self.rebulk.matches(string, options)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 275, in matches
    self._execute_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 306, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 318, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 339, in execute_rule
    when_response = rule.when(matches, context)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\rules\rules.py", line 1006, in when
    predicate=lambda match: (match.name == 'episode' and
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\match.py", line 115, in next
    current = match.start + 1
AttributeError: 'NoneType' object has no attribute 'start'
--------------------------------------------------------------------
Please report at https://github.com/guessit-io/guessit/issues.
====================================================================
2016-09-12 22:30:19 INFO     TORNADO :: [9c6346b] User logged into the Medusa web interface
2016-09-12 22:30:20 INFO     Thread-19 :: [9c6346b] PostProcessing Path: C:\Users\uTorrentVM\Downloads\Complete\sb
2016-09-12 22:30:22 ERROR    Thread-19 :: [9c6346b] Failed doing web ui callback: Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\core\base.py", line 270, in async_call
    result = function(**kwargs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\home\post_process.py", line 50, in processEpisode
    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), proc_type=type, ignore_subs=argToBool(ignore_subs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 303, in processDir
    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, ignore_subs, result)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 571, in process_media
    if already_postprocessed(processPath, cur_video_file, force, result):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 531, in already_postprocessed
    parse_result = NameParser(try_indexers=True).parse(dirName)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 235, in parse
    result = self._parse_string(name)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 62, in _parse_string
    guess = guessit.guessit(name, dict(show_type=self.show_type))
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\guessit_parser.py", line 99, in guessit
    return default_api.guessit(name, options=final_options)
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 113, in guessit
    raise GuessitException(string, options)
GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=2.1.0.dev0
string=C:\Users\uTorrentVM\Downloads\Complete\sb\[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_mkv_[5_7]_-_`[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_vol03+04_par2`
options={'allowed_languages': ['ru', 'hu', 'en', 'nl', 'pt', 'de', 'jp', 'sv', 'it', 'fr', 'es', 'uk', 'ro', 'pl', 'he'], 'expected_group': ['re:\\bCDD\\b', 're:\\bF4ST3R\\b', 're:\\bTGNF4ST\\b', 're:\\bNovaRip\\b', 're:\\bRiPRG\\b', 're:\\bPtM\\b', 're:\\bbyEMP\\b', 're:\\b4EVERHD\\b', 're:\\bPOURMOi\\b', 're:\\bPARTiCLE\\b', 're:\\bTV2LAX9\\b', 're:\\bCDP\\b', 're:\\bELITETORRENT\\b', 're:\\bRipPourBox\\b', 're:\\bF4ST\\b', 're:\\bHDD\\b'], 'expected_title': ['re:(?<![^/\\\\])\\w+ it\\b', 're:\\bMob +Psycho +100\\b'], 'allowed_countries': ['gb', 'us'], 'episode_prefer_number': False, 'show_type': None, 'type': u'episode', 'implicit': True}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 102, in guessit
    matches = self.rebulk.matches(string, options)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 275, in matches
    self._execute_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 306, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 318, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 339, in execute_rule
    when_response = rule.when(matches, context)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\rules\rules.py", line 1006, in when
    predicate=lambda match: (match.name == 'episode' and
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\match.py", line 115, in next
    current = match.start + 1
AttributeError: 'NoneType' object has no attribute 'start'
--------------------------------------------------------------------
Please report at https://github.com/guessit-io/guessit/issues.
====================================================================
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\core\base.py", line 270, in async_call
    result = function(**kwargs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\server\web\home\post_process.py", line 50, in processEpisode
    is_priority=argToBool(is_priority), delete_on=argToBool(delete_on), failed=argToBool(failed), proc_type=type, ignore_subs=argToBool(ignore_subs)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 303, in processDir
    process_media(processPath, videoFiles, nzbName, process_method, force, is_priority, ignore_subs, result)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 571, in process_media
    if already_postprocessed(processPath, cur_video_file, force, result):
  File "C:\Users\uTorrentVM\SickRage\sickbeard\processTV.py", line 531, in already_postprocessed
    parse_result = NameParser(try_indexers=True).parse(dirName)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 235, in parse
    result = self._parse_string(name)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\parser.py", line 62, in _parse_string
    guess = guessit.guessit(name, dict(show_type=self.show_type))
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\guessit_parser.py", line 99, in guessit
    return default_api.guessit(name, options=final_options)
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 113, in guessit
    raise GuessitException(string, options)
GuessitException: An internal error has occured in guessit.
===================== Guessit Exception Report =====================
version=2.1.0.dev0
string=C:\Users\uTorrentVM\Downloads\Complete\sb\[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_mkv_[5_7]_-_`[HorribleSubs]_Mob_Psycho_100_-_10_[1080p]_vol03+04_par2`
options={'allowed_languages': ['ru', 'hu', 'en', 'nl', 'pt', 'de', 'jp', 'sv', 'it', 'fr', 'es', 'uk', 'ro', 'pl', 'he'], 'expected_group': ['re:\\bCDD\\b', 're:\\bF4ST3R\\b', 're:\\bTGNF4ST\\b', 're:\\bNovaRip\\b', 're:\\bRiPRG\\b', 're:\\bPtM\\b', 're:\\bbyEMP\\b', 're:\\b4EVERHD\\b', 're:\\bPOURMOi\\b', 're:\\bPARTiCLE\\b', 're:\\bTV2LAX9\\b', 're:\\bCDP\\b', 're:\\bELITETORRENT\\b', 're:\\bRipPourBox\\b', 're:\\bF4ST\\b', 're:\\bHDD\\b'], 'expected_title': ['re:(?<![^/\\\\])\\w+ it\\b', 're:\\bMob +Psycho +100\\b'], 'allowed_countries': ['gb', 'us'], 'episode_prefer_number': False, 'show_type': None, 'type': u'episode', 'implicit': True}
--------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\uTorrentVM\SickRage\lib\guessit\api.py", line 102, in guessit
    matches = self.rebulk.matches(string, options)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 275, in matches
    self._execute_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rebulk.py", line 306, in _execute_rules
    rules.execute_all_rules(matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 318, in execute_all_rules
    when_response = execute_rule(rule, matches, context)
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\rules.py", line 339, in execute_rule
    when_response = rule.when(matches, context)
  File "C:\Users\uTorrentVM\SickRage\sickbeard\name_parser\rules\rules.py", line 1006, in when
    predicate=lambda match: (match.name == 'episode' and
  File "C:\Users\uTorrentVM\SickRage\lib\rebulk\match.py", line 115, in next
    current = match.start + 1
AttributeError: 'NoneType' object has no attribute 'start'
--------------------------------------------------------------------
Please report at https://github.com/guessit-io/guessit/issues.
====================================================================

# Fixed code
def subtitles_enabled(*args):
    """Try to parse names to a show and check whether the show has subtitles enabled.

    :param args:
    :return:
    :rtype: bool
    """
    for name in args:
        if not name:
            continue

        try:
            parse_result = NameParser().parse(name, cache_result=True)
            if parse_result.show.indexerid:
                main_db_con = db.DBConnection()
                sql_results = main_db_con.select(
                    "SELECT subtitles FROM tv_shows WHERE indexer_id = ? LIMIT 1",
                    [parse_result.show.indexerid],
                )
                return bool(sql_results[0]["subtitles"]) if sql_results else False

            logger.log("Empty indexer ID for: {name}".format(name=name), logger.WARNING)
        except (InvalidNameException, InvalidShowException):
            logger.log(
                "Not enough information to parse filename into a valid show. Consider adding scene exceptions "
                "or improve naming for: {name}".format(name=name),
                logger.WARNING,
            )
    return False