Skip to content

Commit f9e3e76

Browse files
authored
Encode parameter yaml as utf-8 to fix error when running on windows (#333)
Simple Windows compatibility fix - adds UTF-8 encoding when loading YAML parameter files. Fixes #330
1 parent 003cef6 commit f9e3e76

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changelog_entry.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- bump: patch
2+
changes:
3+
fixed:
4+
- Issue of running on windows because of not having UTF-8 encoding.

policyengine_core/parameters/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def _compose_name(path, child_name=None, item_name=None):
4141

4242

4343
def _load_yaml_file(file_path):
44-
with open(file_path, "r") as f:
44+
with open(file_path, "r", encoding="utf-8") as f:
4545
try:
4646
return config.yaml.load(f, Loader=config.Loader)
4747
except (

0 commit comments

Comments
 (0)