From 19c5fd6fc7fdcb84b0c6d9a2b722c0452c576641 Mon Sep 17 00:00:00 2001 From: yuhao Date: Fri, 17 May 2024 19:47:05 -0400 Subject: [PATCH] Added "print exception" to track the error. Signed-off-by: yuhao --- cncf-youtube-channel-summarizer/transcript_summarizer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cncf-youtube-channel-summarizer/transcript_summarizer.py b/cncf-youtube-channel-summarizer/transcript_summarizer.py index 39abd37..497da26 100644 --- a/cncf-youtube-channel-summarizer/transcript_summarizer.py +++ b/cncf-youtube-channel-summarizer/transcript_summarizer.py @@ -80,11 +80,13 @@ def run(self): try: summary, keywords = self.LLM_summarizer(self.llm_summary.to_langchain(), self.llm_keywords.to_langchain(), transcript, chunk_size, chunk_overlap, key) - except: + except Exception as e: logger.error(f"Failed to generate the summary and keywords for video: {key}") + logger.error(f"{e}") missed_video_id = open('cncf-youtube-channel-summarizer/data/missed_video_id.txt', 'a') - missed_video_id.write(key) - continue + missed_video_id.write(key+',') + #continue + break data = {'video_id': [key], 'video_title': [self.videos_dict[key]['video_title']], 'conference_name': [self.videos_dict[key]['play_list']['title']], 'summary': [summary],