##// END OF EJS Templates
Kernel fails to start when username has non-ascii characters
Puneeth Chaganti -
Show More
@@ -49,7 +49,7 b' from IPython.config.configurable import Configurable, LoggingConfigurable'
49 from IPython.utils import io
49 from IPython.utils import io
50 from IPython.utils.importstring import import_item
50 from IPython.utils.importstring import import_item
51 from IPython.utils.jsonutil import extract_dates, squash_dates, date_default
51 from IPython.utils.jsonutil import extract_dates, squash_dates, date_default
52 from IPython.utils.py3compat import str_to_bytes
52 from IPython.utils.py3compat import str_to_bytes, str_to_unicode
53 from IPython.utils.traitlets import (CBytes, Unicode, Bool, Any, Instance, Set,
53 from IPython.utils.traitlets import (CBytes, Unicode, Bool, Any, Instance, Set,
54 DottedObjectName, CUnicode, Dict, Integer)
54 DottedObjectName, CUnicode, Dict, Integer)
55 from IPython.kernel.zmq.serialize import MAX_ITEMS, MAX_BYTES
55 from IPython.kernel.zmq.serialize import MAX_ITEMS, MAX_BYTES
@@ -296,8 +296,9 b' class Session(Configurable):'
296 # bsession is the session as bytes
296 # bsession is the session as bytes
297 bsession = CBytes(b'')
297 bsession = CBytes(b'')
298
298
299 username = Unicode(os.environ.get('USER',u'username'), config=True,
299 username = Unicode(str_to_unicode(os.environ.get('USER', 'username')),
300 help="""Username for the Session. Default is your system username.""")
300 help="""Username for the Session. Default is your system username.""",
301 config=True)
301
302
302 metadata = Dict({}, config=True,
303 metadata = Dict({}, config=True,
303 help="""Metadata dictionary, which serves as the default top-level metadata dict for each message.""")
304 help="""Metadata dictionary, which serves as the default top-level metadata dict for each message.""")
General Comments 0
You need to be logged in to leave comments. Login now