From 1101df6be6ed811846a5d978da736db16e038528 2014-02-07 20:09:38 From: MinRK Date: 2014-02-07 20:09:38 Subject: [PATCH] Backport PR #4264: catch unicode error listing profiles there can be garbage files on the filesystem, and we shouldn't be bothered by them. Candidate for backport --- diff --git a/IPython/core/profileapp.py b/IPython/core/profileapp.py index 96948a9..3ceace7 100644 --- a/IPython/core/profileapp.py +++ b/IPython/core/profileapp.py @@ -99,7 +99,10 @@ def list_profiles_in(path): files = os.listdir(path) profiles = [] for f in files: - full_path = os.path.join(path, f) + try: + full_path = os.path.join(path, f) + except UnicodeError: + continue if os.path.isdir(full_path) and f.startswith('profile_'): profiles.append(f.split('_',1)[-1]) return profiles