From b40a5aa2435807e5c3bdcc4fc8c15b3982364009 Mon Sep 17 00:00:00 2001 From: Alexander Graf <17130992+aandergr@users.noreply.github.com> Date: Tue, 2 May 2023 09:47:30 +0200 Subject: [PATCH] resumable_iterator: catch EOFError when loading resume file Fixes #1905. --- instaloader/nodeiterator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instaloader/nodeiterator.py b/instaloader/nodeiterator.py index bd9d4e1..95466c8 100644 --- a/instaloader/nodeiterator.py +++ b/instaloader/nodeiterator.py @@ -289,7 +289,7 @@ def resumable_iteration(context: InstaloaderContext, is_resuming = True start_index = iterator.total_index context.log("Resuming from {}.".format(resume_file_path)) - except (InvalidArgumentException, LZMAError, json.decoder.JSONDecodeError) as exc: + except (InvalidArgumentException, LZMAError, json.decoder.JSONDecodeError, EOFError) as exc: context.error("Warning: Not resuming from {}: {}".format(resume_file_path, exc)) try: yield is_resuming, start_index