From 9006492b6448265210f50c8b59461f0d2801db8f Mon Sep 17 00:00:00 2001 From: Jonathan S Rockhill Date: Wed, 28 Sep 2022 10:24:38 -0400 Subject: [PATCH] updated get_household_clks to work on windows with archives created on MacOS --- dcctools/config.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dcctools/config.py b/dcctools/config.py index a9541a8..bae59b5 100644 --- a/dcctools/config.py +++ b/dcctools/config.py @@ -197,9 +197,11 @@ def get_household_clks_raw(self, system, schema): self.config_json["inbox_folder"] ) / "{}_households.zip".format(system) with ZipFile(clk_zip_path, mode="r") as clk_zip: - with clk_zip.open( - str(Path("output") / "households" / f"{schema}.json") - ) as clk_file: + for file_name in clk_zip.namelist(): + if f"{schema}.json" in file_name: + project_file = file_name + break + with clk_zip.open(project_file) as clk_file: clks = clk_file.read() return clks