Skip to content

Commit

Permalink
Write archive in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gmertes committed Jul 24, 2024
1 parent 9527d68 commit e1cda00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/anemoi/registry/entry/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ def get_archive(self, path, *, platform, run_number):
url = run_record["archives"][platform]["url"]
LOG.info(f"Downloading {url} to {tmp_path}.")
download(url, tmp_path)
with open(path, "a+") as f:
with open(tmp_path, "r") as tmp:
with open(path, "ba+") as f:
with open(tmp_path, "br") as tmp:
f.write(tmp.read())

def delete_artefacts(self):
Expand Down

0 comments on commit e1cda00

Please sign in to comment.