Skip to content

Commit

Permalink
python: ensure utf8 encoding when writing dot file (#4225)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Aug 2, 2022
1 parent 0997c29 commit eb46056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py-polars/polars/internals/lazy_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def show_graph(
return dot
with tempfile.TemporaryDirectory() as tmpdir_name:
dot_path = os.path.join(tmpdir_name, "dot")
with open(dot_path, "w") as f:
with open(dot_path, "w", encoding="utf8") as f:
f.write(dot)

subprocess.run(["dot", "-Nshape=box", "-Tpng", "-O", dot_path])
Expand Down

0 comments on commit eb46056

Please sign in to comment.