Skip to content

Commit 4074ee2

Browse files
authored
Merge pull request #187 from AA-Turner/patch-1
Resolve default-encoding errors on Windows
2 parents cf96d20 + 7220d6d commit 4074ee2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jupyterlite_sphinx/jupyterlite_sphinx.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,9 @@ def run(self):
522522
] = notebook_unique_name
523523
# Copy the Notebook for NotebookLite to find
524524
os.makedirs(notebooks_dir, exist_ok=True)
525-
with open(notebooks_dir / Path(notebook_unique_name), "w") as f:
525+
with open(
526+
notebooks_dir / Path(notebook_unique_name), "w", encoding="utf-8"
527+
) as f:
526528
# nbf.write incorrectly formats multiline arrays in output.
527529
json.dump(nb, f, indent=4, ensure_ascii=False)
528530

0 commit comments

Comments
 (0)