diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 20be704b63..56ec6deba0 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -213,7 +213,7 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager, now = utcnow() root_dir = contents_manager.root_dir - home = os.path.expanduser('~') + home = py3compat.str_to_unicode(os.path.expanduser('~'), encoding=sys.getfilesystemencoding()) if root_dir.startswith(home + os.path.sep): # collapse $HOME to ~ root_dir = '~' + root_dir[len(home):]