Skip to content

Commit db6735b

Browse files
Merge pull request #57 from renan-r-santos/fix-encoding
Fix: set encoding to UTF-8 when reading notebooks
2 parents 10ca620 + 5e9a639 commit db6735b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pixi_kernel/provisioner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ async def pre_launch(self, **kwargs: Any) -> dict[str, Any]:
5454
environment_name = "default"
5555
else:
5656
try:
57-
notebook = json.loads(Path(notebook_path).read_text())
57+
# Set encoding to utf-8 to avoid issues on Windows
58+
# https://github.com/renan-r-santos/pixi-kernel/issues/55
59+
notebook = json.loads(Path(notebook_path).read_text(encoding="utf-8"))
5860
environment_name = notebook["metadata"]["pixi-kernel"]["environment"]
5961
except Exception:
6062
self.log.exception(

0 commit comments

Comments
 (0)