From 5df14442552038d7344162b21f97dd510fe2ffd6 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 20 Jun 2022 12:30:02 +0530 Subject: [PATCH] [utils] `ExtractorError`: Fix `exc_info` --- yt_dlp/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 9c16d66013..10bcd5f4ec 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -1037,6 +1037,8 @@ class ExtractorError(YoutubeDLError): self.video_id = video_id self.ie = ie self.exc_info = sys.exc_info() # preserve original exception + if isinstance(self.exc_info[1], ExtractorError): + self.exc_info = self.exc_info[1].exc_info super().__init__(''.join(( format_field(ie, None, '[%s] '),