Skip to content

Commit

Permalink
properly decode utf8 from gsheet csv (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
melange396 authored Feb 7, 2025
1 parent 0b77b3e commit f4e92ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def update_gdoc(
base_dir = pathlib.Path("./src/server/endpoints/covidcast_utils/")

def _migrate_file(url: str, filename: str):
r = requests.get(url).text.replace("\r\n", "\n")
r = requests.get(url).content.decode("utf8").replace("\r\n", "\n")
rows = r.split("\n")
rows = [r for r in rows if not r.startswith(",")]
file_ = base_dir / filename
Expand Down

0 comments on commit f4e92ef

Please sign in to comment.