From addbe3cc67aefd4968c9552907f3ba9129bbdfec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=B6ffner?= Date: Tue, 16 Jul 2024 03:46:22 +0200 Subject: [PATCH] Always use the original file format when downloading files. Otherwise, the files will not have the correct hashes, as dataverse replaces, e.g., csv or R table files with its own tabular data format. Closes #307. --- datalad_dataverse/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datalad_dataverse/dataset.py b/datalad_dataverse/dataset.py index 7fb8f52..94d7d74 100644 --- a/datalad_dataverse/dataset.py +++ b/datalad_dataverse/dataset.py @@ -171,7 +171,7 @@ def download_file(self, fid: int, path: Path): # https://github.com/gdcc/pyDataverse/issues/49 # the code below is nevertheless readied for such a # scenario - response = self.data_access_api.get_datafile(fid) + response = self.data_access_api.get_datafile(fid, data_format="original") # http error handling response.raise_for_status() with path.open("wb") as f: