Skip to content

Cause TypeError: 'NoneType' object is not callable in qtconsole  #7049

@khsing

Description

@khsing

This happens when using qtconsole to display plot

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/IPython/qt/console/frontend_widget.py", line 60, in highlightBlock
    super(FrontendHighlighter, self).highlightBlock(string)
  File "/usr/local/lib/python2.7/site-packages/IPython/qt/console/pygments_highlighter.py", line 115, in highlightBlock
    for token, text in self._lexer.get_tokens(string):
  File "/usr/local/lib/python2.7/site-packages/pygments/lexer.py", line 192, in streamer
    for i, t, v in self.get_tokens_unprocessed(text):
  File "/usr/local/lib/python2.7/site-packages/IPython/qt/console/pygments_highlighter.py", line 30, in get_tokens_unprocessed
    for item in action(self, m):
TypeError: 'NoneType' object is not callable

My environment is OS X 10.10.1, homebrew installed python 2.7.8

$ pip freeze
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.1
backports.ssl-match-hostname==3.4.0.2
certifi==14.05.14
gnureadline==6.3.3
ipython==2.3.1
matplotlib==1.4.2
mock==1.0.1
nose==1.3.4
numpy==1.9.1
pyparsing==2.0.3
python-dateutil==2.2
pytz==2014.10
pyzmq==14.4.1
scipy==0.14.0
six==1.8.0
tornado==4.0.2
virtualenv==1.11.6
wsgiref==0.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions