diff --git a/IPython/utils/openpy.py b/IPython/utils/openpy.py index 38fb150..5074e8e 100644 --- a/IPython/utils/openpy.py +++ b/IPython/utils/openpy.py @@ -130,7 +130,7 @@ def source_to_unicode(txt, errors='replace', skip_encoding_cookie=True): """ if isinstance(txt, unicode): return txt - if isinstance(txt, str): + if isinstance(txt, bytes): buffer = BytesIO(txt) else: buffer = txt