diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index e1db9d879e..de93e93f1b 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -212,7 +212,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):]