diff --git a/src/geometamaker/models.py b/src/geometamaker/models.py index b6e381b..b99175d 100644 --- a/src/geometamaker/models.py +++ b/src/geometamaker/models.py @@ -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())) @@ -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'])))