TraitError in on any input #405

jfkw opened this Issue Apr 29, 2011 · 6 comments

4 participants


For the past month or so with ipython master, on any input, the following error is raised:

TraitError: The 'pprint' trait of a PlainTextFormatter instance must be a boolean, but a value of 0 was specified.

  ~ $ ipython
  >>> 2+2
  > /usr/lib64/python2.7/site-packages/IPython/utils/
      331                 % (,, repr_type(value))            
  --> 332         raise TraitError(e)

  ipdb> q
  Traceback (most recent call last):
    File "", line 1, in 
    File "/usr/lib64/python2.7/site-packages/IPython/core/", line 302, in __call__
      format_dict = self.compute_format_data(result)
    File "/usr/lib64/python2.7/site-packages/IPython/core/", line 215, in compute_format_data
    File "/usr/lib64/python2.7/site-packages/IPython/core/", line 113, in format
      for format_type, formatter in self.formatters.items():
    File "/usr/lib64/python2.7/site-packages/IPython/utils/", line 283, in __get__
      value = obj._trait_dyn_inits[](obj)
    File "/usr/lib64/python2.7/site-packages/IPython/core/", line 59, in _formatters_default
      f = cls(config=self.config)
    File "/usr/lib64/python2.7/site-packages/IPython/config/", line 83, in __init__
      self.config = config
    File "/usr/lib64/python2.7/site-packages/IPython/utils/", line 305, in __set__
      obj._notify_trait(, old_value, new_value)
    File "/usr/lib64/python2.7/site-packages/IPython/utils/", line 456, in _notify_trait
      c(name, old_value, new_value)
    File "/usr/lib64/python2.7/site-packages/IPython/config/", line 138, in _config_changed
      setattr(self, k, deepcopy(config_value))
    File "/usr/lib64/python2.7/site-packages/IPython/utils/", line 301, in __set__
      new_value = self._validate(obj, value)
    File "/usr/lib64/python2.7/site-packages/IPython/utils/", line 309, in _validate
      return self.validate(obj, value)
    File "/usr/lib64/python2.7/site-packages/IPython/utils/", line 963, in validate
      self.error(obj, value)
    File "/usr/lib64/python2.7/site-packages/IPython/utils/", line 332, in error
      raise TraitError(e)
  TraitError: The 'pprint' trait of a PlainTextFormatter instance must be a boolean, but a value of 0  was specified.

Should be fixed by cc9d85e

IPython member

something this glaring lasting a month or more just goes to show how many people use --classic mode.

I can confirm that cc9d85e fixes the issue. Testing that also revealed that IPython would always crash on exit in classic mode. This is fixed in 1dc55eb.


Thank you for the fix(es).

Minutes after posting, I fat-fingered an rm command, removing my .ipython. The normal mode with no config worked perfectly.

--classic mode? I can't restore my config from backup until tonight to check what's in it, but I try to keep the inputs '>>> ' , the continuation '... ', and the output unadorned, like the regular python shell. This is mainly for pasting into doctests. My apologies for not utilizing all the hard work you guys put into the ipython repl rendering ;)

IPython member

If you were asking what '--classic' mode is, if you do:

ipython --classic

You will get the prompts, output, etc. of the regular Python shell.

@minrk minrk closed this Apr 29, 2011
IPython member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment