diff --git a/renga/notebook.py b/renga/notebook.py index 7982a2f473..9e15ca188c 100644 --- a/renga/notebook.py +++ b/renga/notebook.py @@ -240,7 +240,9 @@ def _save_notebook(self, path, nb): file_ = self._resolve_path(path)._obj with file_.open('w') as fp: - fp.write(nbformat.writes(nb, version=nbformat.NO_CONVERT)) + fp.write( + nbformat.writes(nb, version=nbformat.NO_CONVERT).encode( + 'utf-8')) def _resolve_path(self, path): """Return a resource based on the specified path."""