Skip to content

Commit

Permalink
Fix package import encoding issues (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroenlein authored May 14, 2024
1 parent 7b9735b commit 8b3fdb2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gemd/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.1.3"
__version__ = "2.1.4"
2 changes: 1 addition & 1 deletion gemd/demo/strehlow_and_cook.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def import_table(filename=SMALL_TABLE):
from importlib_resources import files
import json

return json.loads(files("gemd.demo").joinpath(filename).read_text())
return json.loads(files("gemd.demo").joinpath(filename).read_text(encoding='utf-8'))


def _fingerprint(row):
Expand Down
2 changes: 1 addition & 1 deletion gemd/units/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _deploy_default_files() -> Tuple[Path, Path]:
target_paths = tuple(target_dir / f for f in ("citrine_en.txt", "constants_en.txt"))
for target in target_paths:
source = resources.joinpath(target.name)
target.write_text(source.read_text(), encoding="utf-8")
target.write_bytes(source.read_bytes())

return target_paths

Expand Down

0 comments on commit 8b3fdb2

Please sign in to comment.