Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chris Jewell
covid19uk
Commits
a8997304
Commit
a8997304
authored
Mar 30, 2021
by
Chris Jewell
Browse files
Fix to trap ChunkedEncodingError in data download
parent
06fa18ec
Changes
1
Show whitespace changes
Inline
Side-by-side
covid/data/case_data.py
View file @
a8997304
...
...
@@ -56,8 +56,9 @@ class CasesData:
df
=
pd
.
read_json
(
json
.
dumps
(
content
[
"body"
]))
print
(
"Success"
,
flush
=
True
)
return
df
except
ConnectionResetError
:
except
(
requests
.
ConnectionError
,
requests
.
RequestException
)
as
e
:
print
(
"Failed"
,
flush
=
True
)
print
(
e
)
time
.
sleep
(
secs
*
2
**
i
)
raise
ConnectionError
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment