From e1cda008b68aa0358d4d3ff96061baeee77cee20 Mon Sep 17 00:00:00 2001 From: Gert Mertes Date: Wed, 24 Jul 2024 14:48:05 +0000 Subject: [PATCH] Write archive in binary mode --- src/anemoi/registry/entry/experiment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anemoi/registry/entry/experiment.py b/src/anemoi/registry/entry/experiment.py index ba69bc5..1a9245c 100644 --- a/src/anemoi/registry/entry/experiment.py +++ b/src/anemoi/registry/entry/experiment.py @@ -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):