Skip to content

Commit 8567e78

Browse files
committed
specified encoding for open()
1 parent b0b500a commit 8567e78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

update_items.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _get_current_runtime(gis):
125125

126126
def _read_items_metadata_yaml():
127127
"""Returns the items_metadata.yaml file as a dict"""
128-
with open(ITEMS_METADATA_YAML_PATH) as f:
128+
with open(ITEMS_METADATA_YAML_PATH, encoding="utf-8") as f:
129129
return yaml.safe_load(f)
130130

131131

@@ -236,7 +236,7 @@ def _apply_html_preview_to_item(self, item, nb_path):
236236

237237
json_file_name = "notebook_preview.json"
238238
json_file_path = os.path.join(".", json_file_name)
239-
with open(json_file_path, 'w') as f:
239+
with open(json_file_path, 'w', encoding="utf-8") as f:
240240
json.dump({"html": html_str}, f)
241241

242242
if item.resources.list():

0 commit comments

Comments
 (0)