Skip to content

Commit f4e92ef

Browse files
authored
properly decode utf8 from gsheet csv (#1548)
1 parent 0b77b3e commit f4e92ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def update_gdoc(
1818
base_dir = pathlib.Path("./src/server/endpoints/covidcast_utils/")
1919

2020
def _migrate_file(url: str, filename: str):
21-
r = requests.get(url).text.replace("\r\n", "\n")
21+
r = requests.get(url).content.decode("utf8").replace("\r\n", "\n")
2222
rows = r.split("\n")
2323
rows = [r for r in rows if not r.startswith(",")]
2424
file_ = base_dir / filename

0 commit comments

Comments
 (0)