Skip to content

Commit

Permalink
always write files with uft8 encoding. natcap#71
Browse files Browse the repository at this point in the history
  • Loading branch information
davemfish committed Jan 30, 2025
1 parent 85c538c commit e446063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geometamaker/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def write(self, target_path):
target_path (str): path to a yaml file to be written
"""
with open(target_path, 'w') as file:
with open(target_path, 'w', encoding='utf-8') as file:
file.write(utils.yaml_dump(self.model_dump()))


Expand Down Expand Up @@ -523,7 +523,7 @@ def write(self, workspace=None):
target_path = os.path.join(
workspace, os.path.basename(self.metadata_path))

with open(target_path, 'w') as file:
with open(target_path, 'w', encoding='utf-8') as file:
file.write(utils.yaml_dump(
self.model_dump(exclude=['metadata_path'])))

Expand Down

0 comments on commit e446063

Please sign in to comment.