TraitError in debug mode

While trying to print variable values in python prompt while debugging, I am getting this error in pycharm community edition 5.0.3. 

TraitError: Unexpected error in TraitType: default value not set properly





Traceback (most recent call last):
File "/home/joe/pycharm-community-5.0.3/helpers/pydev/", line 1323, in doIt
result = pydevconsole.consoleExec(self.thread_id, self.frame_id, self.expression)
File "/home/joe/pycharm-community-5.0.3/helpers/pydev/", line 442, in consoleExec
return exec_code(CodeFragment(expression), updated_globals, frame.f_locals)
File "/home/joe/pycharm-community-5.0.3/helpers/pydev/", line 359, in exec_code
interpreterInterface = get_interpreter()
File "/home/joe/pycharm-community-5.0.3/helpers/pydev/", line 341, in get_interpreter
interpreterInterface = InterpreterInterface(None, None, threading.currentThread())
File "/home/joe/pycharm-community-5.0.3/helpers/pydev/", line 26, in __init__
self.interpreter = get_pydev_frontend(host, client_port)
File "/home/joe/pycharm-community-5.0.3/helpers/pydev/", line 472, in get_pydev_frontend
_PyDevFrontEndContainer._instance = _PyDevFrontEnd()
File "/home/joe/pycharm-community-5.0.3/helpers/pydev/", line 303, in __init__
self.ipython = PyDevTerminalInteractiveShell.instance()
File "/usr/local/lib/python2.7/dist-packages/IPython/config/", line 337, in instance
inst = cls(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/IPython/core/", line 512, in __init__
File "/usr/local/lib/python2.7/dist-packages/IPython/core/", line 1911, in init_readline
if self.readline_use:
File "/usr/local/lib/python2.7/dist-packages/traitlets/", line 310, in __get__
raise TraitError('Unexpected error in TraitType: '
TraitError: Unexpected error in TraitType: default value not set properly

Comment actions Permalink

Hi! What is your IPython version?

Comment actions Permalink

You need to update your traitlets version

pip install traitlets --upgrade

Comment actions Permalink

I think the problem might be with any of these. During some upgrade both ipython and traitlets got updated. Now it is working fine.

Ipython is now 4.0.3

Thanks for the suggestions.


Please sign in to leave a comment.