diff --git a/yt_dlp/downloader/fragment.py b/yt_dlp/downloader/fragment.py index e5bc23e54..9012a1795 100644 --- a/yt_dlp/downloader/fragment.py +++ b/yt_dlp/downloader/fragment.py @@ -134,6 +134,8 @@ def _download_fragment(self, ctx, frag_url, info_dict, headers=None, request_dat return True def _read_fragment(self, ctx): + if not ctx.get('fragment_filename_sanitized'): + return None try: down, frag_sanitized = self.sanitize_open(ctx['fragment_filename_sanitized'], 'rb') except FileNotFoundError: