fix: add try except to movie skill
@@ -73,6 +73,7 @@ class MovieSkillScenario:
attributes = []
for dialog in dialogs:
+ try:
curr_user_uttr = dialog["human_utterances"][-1]
response, confidence, human_attr, bot_attr, attr = "", 0.0, {}, {}, {}
human_attr = dialog["human"]["attributes"]
@@ -138,6 +139,10 @@ class MovieSkillScenario:
human_attr[p] = dialog["human"]["attributes"].get(p, [])
human_attr["discussed_movie_titles"] += [self.templates.imdb(movie_id).get("title", "")]
human_attr["discussed_movie_ids"] += [movie_id]
+ except Exception as e:
+ sentry_sdk.capture_exception(e)
+ logger.exception(e)
+ response, confidence, human_attr, bot_attr, attr = "", 0., {}, {}, {}
responses.append(response.strip())
confidences.append(confidence)
