From cffbe5df8b610eb68bc5e1801e9970f6d89b9430 Mon Sep 17 00:00:00 2001 From: Ken Kroenlein Date: Mon, 5 Feb 2024 13:25:17 -0700 Subject: [PATCH] Correct encoding error on Windows with units file extraction --- gemd/__version__.py | 2 +- gemd/units/impl.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gemd/__version__.py b/gemd/__version__.py index e2f88eea..4dc204e4 100644 --- a/gemd/__version__.py +++ b/gemd/__version__.py @@ -1 +1 @@ -__version__ = "1.18.4" +__version__ = "1.18.5" diff --git a/gemd/units/impl.py b/gemd/units/impl.py index 78b38c0b..94a2c011 100644 --- a/gemd/units/impl.py +++ b/gemd/units/impl.py @@ -30,10 +30,10 @@ def _deploy_default_files() -> str: """Copy the units & constants file into a temporary directory.""" units_path = Path(_TEMP_DIRECTORY.name) / "citrine_en.txt" - units_path.write_text(read_text("gemd.units", "citrine_en.txt")) + units_path.write_text(read_text("gemd.units", "citrine_en.txt"), encoding="utf-8") constants_path = Path(_TEMP_DIRECTORY.name) / "constants_en.txt" - constants_path.write_text(read_text("gemd.units", "constants_en.txt")) + constants_path.write_text(read_text("gemd.units", "constants_en.txt"), encoding="utf-8") return str(units_path)