Skip to content

Commit 8ecfe52

Browse files
committed
fix(stream): add encoding option in open
1 parent 4778900 commit 8ecfe52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plot_data/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def to_html_stream(self, stream, debug_mode: bool = False, canvas_id: str = 'can
117117
def to_html(self, filepath: str = None, debug_mode: bool = False, canvas_id: str = 'canvas', version: str = None):
118118
""" Export current Figure to an HTML file given by the filepath. """
119119
filepath = make_filepath(filepath=filepath)
120-
with open(filepath, 'w') as file:
120+
with open(filepath, 'w', encoding="utf-8") as file:
121121
self.to_html_stream(file, debug_mode=debug_mode, canvas_id=canvas_id, version=version)
122122
return filepath
123123

0 commit comments

Comments
 (0)