diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 079b8716a6..6b680ed9a4 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -1739,7 +1739,7 @@ def launch_browser(self): # Write a temporary file to open in the browser fd, open_file = tempfile.mkstemp(suffix='.html') - with open(fd, 'w', encoding='utf-8') as fh: + with io.open(fd, 'w', encoding='utf-8') as fh: self._write_browser_open_file(uri, fh) else: open_file = self.browser_open_file