diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index e1db9d879ef..c2066e40af0 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -213,6 +213,8 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager, root_dir = contents_manager.root_dir home = os.path.expanduser('~') + if sys.version_info.major == 2: + home = home.decode(sys.getfilesystemencoding()) if root_dir.startswith(home + os.path.sep): # collapse $HOME to ~ root_dir = '~' + root_dir[len(home):]