Commit a8997304 authored by Chris Jewell's avatar Chris Jewell
Browse files

Fix to trap ChunkedEncodingError in data download

parent 06fa18ec
...@@ -56,8 +56,9 @@ class CasesData: ...@@ -56,8 +56,9 @@ class CasesData:
df = pd.read_json(json.dumps(content["body"])) df = pd.read_json(json.dumps(content["body"]))
print("Success", flush=True) print("Success", flush=True)
return df return df
except ConnectionResetError: except (requests.ConnectionError, requests.RequestException) as e:
print("Failed", flush=True) print("Failed", flush=True)
time.sleep(secs * 2 ** i) time.sleep(secs * 2 ** i)
raise ConnectionError( raise ConnectionError(
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment