[Python-modules-team] Bug#642326: ipython-qtconsole: crash with nonsense command string
Teemu Ikonen
tpikonen at gmail.com
Wed Sep 21 15:32:35 UTC 2011
Package: ipython-qtconsole
Version: 0.11-1
Severity: normal
Tags: experimental
Running the command
$ ipython qtconsole --c='adsf'
crashes the qtconsole version of ipython and it starts printing
QCoreApplication::exec: The event loop is already running
repeatedly. Crash report is attached.
The terminal version of ipython produces the expected NameError and quits
normally.
Best,
Teemu
-- System Information:
Debian Release: 6.0.2
APT prefers proposed-updates
APT policy: (500, 'proposed-updates'), (500, 'testing'), (500,
'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ipython-qtconsole depends on:
ii ipython 0.11-1 enhanced interactive Python shell
ii python 2.6.7-3 interactive high-level object-orie
ii python-pygments 1.3.1+dfsg-1 syntax highlighting package writte
ii python-qt4 4.7.3-1+b1 Python bindings for Qt4
ii python-zmq 2.1.7-1 Python bindings for 0MQ library
ii python2.6 2.6.7-3 An interactive high-level object-o
ii python2.7 2.7.2-5 An interactive high-level object-o
ipython-qtconsole recommends no packages.
ipython-qtconsole suggests no packages.
-- no debconf information
-------------- next part --------------
***************************************************************************
IPython post-mortem report
{'commit_hash': '464280a',
'commit_source': 'archive substitution',
'ipython_path': '/usr/lib/python2.6/dist-packages/IPython',
'ipython_version': '0.11',
'os_name': 'posix',
'platform': 'Linux-2.6.32-5-amd64-x86_64-with-debian-6.0.2',
'sys_executable': '/usr/bin/python',
'sys_platform': 'linux2',
'sys_version': '2.6.7 (r267:88850, Jul 10 2011, 08:11:54) \n[GCC 4.6.1]'}
***************************************************************************
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
KeyError Python 2.6.7: /usr/bin/python
Wed Sep 21 17:29:31 2011
A problem occured executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/lib/python2.6/dist-packages/IPython/frontend/qt/base_frontend_mixin.pyc in _dispatch(self=<IPython.frontend.qt.console.rich_ipython_widget.RichIPythonWidget object>, msg={'buffers': [], 'content': {'status': 'aborted'}, 'header': {'date': datetime.datetime(2011, 9, 21, 17, 29, 31, 59846), 'msg_id': '7157cd81-9090-44e5-b67c-12b729e30886', 'msg_type': 'history_reply', 'session': '6d95527e-09ed-4c70-a18b-fae50186447c', 'username': 'kernel'}, 'msg_type': 'history_reply', 'parent_header': {'date': datetime.datetime(2011, 9, 21, 17, 29, 30, 825742), 'msg_id': '43d1786b-16ca-403a-ae32-5bee26326f98', 'msg_type': 'history_request', 'session': '83f37a92-3275-41d1-b424-8611b68da7a8', 'username': 'ikonen'}})
87 """ Called when the KernelManager channels have stopped listening or
88 when a listening KernelManager is removed from the frontend.
89 """
90
91 #---------------------------------------------------------------------------
92 # 'BaseFrontendMixin' protected interface
93 #---------------------------------------------------------------------------
94
95 def _dispatch(self, msg):
96 """ Calls the frontend handler associated with the message type of the
97 given message.
98 """
99 msg_type = msg['msg_type']
100 handler = getattr(self, '_handle_' + msg_type, None)
101 if handler:
--> 102 handler(msg)
103
104 def _is_from_this_session(self, msg):
105 """ Returns whether a reply from the kernel originated from a request
106 from this frontend.
107 """
108 session = self._kernel_manager.session.session
109 return msg['parent_header']['session'] == session
/usr/lib/python2.6/dist-packages/IPython/frontend/qt/console/ipython_widget.pyc in _handle_history_reply(self=<IPython.frontend.qt.console.rich_ipython_widget.RichIPythonWidget object>, msg={'buffers': [], 'content': {'status': 'aborted'}, 'header': {'date': datetime.datetime(2011, 9, 21, 17, 29, 31, 59846), 'msg_id': '7157cd81-9090-44e5-b67c-12b729e30886', 'msg_type': 'history_reply', 'session': '6d95527e-09ed-4c70-a18b-fae50186447c', 'username': 'kernel'}, 'msg_type': 'history_reply', 'parent_header': {'date': datetime.datetime(2011, 9, 21, 17, 29, 30, 825742), 'msg_id': '43d1786b-16ca-403a-ae32-5bee26326f98', 'msg_type': 'history_request', 'session': '83f37a92-3275-41d1-b424-8611b68da7a8', 'username': 'ikonen'}})
163 def _handle_execute_reply(self, msg):
164 """ Reimplemented to support prompt requests.
165 """
166 info = self._request_info.get('execute')
167 if info and info.id == msg['parent_header']['msg_id']:
168 if info.kind == 'prompt':
169 number = msg['content']['execution_count'] + 1
170 self._show_interpreter_prompt(number)
171 else:
172 super(IPythonWidget, self)._handle_execute_reply(msg)
173
174 def _handle_history_reply(self, msg):
175 """ Implemented to handle history tail replies, which are only supported
176 by the IPython kernel.
177 """
--> 178 history_items = msg['content']['history']
global subprocessR = undefined
global R = undefined
global t = undefined
global textwrapR = undefined
global IPython.external.qtR = undefined
global IPython.core.inputsplitterR = undefined
global IPython.core.usageR = undefined
global IPython.utils.traitletsR = undefined
global frontend_widgetR = undefined
179 items = [ line.rstrip() for _, _, line in history_items ]
180 self._set_history(items)
181
182 def _handle_pyout(self, msg):
183 """ Reimplemented for IPython-style "display hook".
184 """
185 if not self._hidden and self._is_from_this_session(msg):
186 content = msg['content']
187 prompt_number = content['execution_count']
188 data = content['data']
189 if data.has_key('text/html'):
190 self._append_plain_text(self.output_sep, True)
191 self._append_html(self._make_out_prompt(prompt_number), True)
192 html = data['text/html']
193 self._append_plain_text('\n', True)
KeyError: 'history'
***************************************************************************
History of session input:
More information about the Python-modules-team
mailing list