From ab327159eda65631edfe8ca6333a73d2e0725dda Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 11 Jun 2021 11:23:10 -0700 Subject: catch/ignore ChunkedEncoding errors in fetches --- fatcat_scholar/sim_pipeline.py | 3 +++ fatcat_scholar/work_pipeline.py | 3 +++ 2 files changed, 6 insertions(+) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/sim_pipeline.py b/fatcat_scholar/sim_pipeline.py index d602edf..aa6f4da 100644 --- a/fatcat_scholar/sim_pipeline.py +++ b/fatcat_scholar/sim_pipeline.py @@ -211,6 +211,9 @@ class SimPipeline: except requests.exceptions.ReadTimeout as e: print(str(e), file=sys.stderr) return + except requests.exceptions.ChunkedEncodingError as e: + print(str(e), file=sys.stderr) + return if not full_issue: return pages = self.full_issue_to_pages(full_issue) diff --git a/fatcat_scholar/work_pipeline.py b/fatcat_scholar/work_pipeline.py index 2b09821..b9c8d33 100644 --- a/fatcat_scholar/work_pipeline.py +++ b/fatcat_scholar/work_pipeline.py @@ -409,6 +409,9 @@ class WorkPipeline: except requests.exceptions.ReadTimeout as e: print(str(e), file=sys.stderr) continue + except requests.exceptions.ChunkedEncodingError as e: + print(str(e), file=sys.stderr) + continue if sim_fulltext: break -- cgit v1.2.3