[IPython-User] Problem passing command at startup with --c param
Edward Chu
edchu79@gmail....
Wed Aug 24 08:19:24 CDT 2011
Hello all
I'm running into an issue passing a command at startup with the --c param.
It causes ipython to crash. I've tried this in both my linux and windows
builds (both 64bit if that matters)
Here is the command I'm running:
ipython qtconsole --pylab=inline --c="print hello"
I also attached the crash report generated
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110824/44a9c62b/attachment.html
-------------- next part --------------
***************************************************************************
IPython post-mortem report
{'commit_hash': '<not found>',
'commit_source': '(none found)',
'ipython_path': 'C:\\Python26\\lib\\site-packages\\ipython-0.11-py2.6.egg\\IPython',
'ipython_version': '0.11',
'os_name': 'nt',
'platform': 'Windows-post2008Server-6.1.7600',
'sys_executable': 'C:\\Python26\\python.exe',
'sys_platform': 'win32',
'sys_version': '2.6.5 |EPD 6.2-2 (64-bit)| (r265:79063, Mar 23 2010, 11:00:09) [MSC v.1500 64 bit (AMD64)]'}
***************************************************************************
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
KeyError Python 2.6.5: C:\Python26\python.exe
Wed Aug 24 08:47: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.
C:\Python26\lib\site-packages\ipython-0.11-py2.6.egg\IPython\frontend\qt\base_frontend_mixin.pyc in _dispatch(self=<IPython.frontend.qt.console.rich_ipython_widget.RichIPythonWidget object>, msg={'buffers': [], 'content': {u'status': u'aborted'}, 'header': {u'date': datetime.datetime(2011, 8, 24, 8, 47, 31, 362000), u'msg_id': u'7f63d71a-b6e3-4506-9345-17650f4afed5', u'msg_type': u'history_reply', u'session': u'86ab2f8a-2b77-4b00-aa6d-d085c70b8406', u'username': u'kernel'}, 'msg_type': u'history_reply', 'parent_header': {u'date': datetime.datetime(2011, 8, 24, 8, 47, 28, 740000), u'msg_id': u'11d69520-37e8-407b-9a04-7a9a7e773854', u'msg_type': u'history_request', u'session': u'1cd161e2-5196-4140-b237-69d077eaca9f', u'username': u'username'}})
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
C:\Python26\lib\site-packages\ipython-0.11-py2.6.egg\IPython\frontend\qt\console\ipython_widget.pyc in _handle_history_reply(self=<IPython.frontend.qt.console.rich_ipython_widget.RichIPythonWidget object>, msg={'buffers': [], 'content': {u'status': u'aborted'}, 'header': {u'date': datetime.datetime(2011, 8, 24, 8, 47, 31, 362000), u'msg_id': u'7f63d71a-b6e3-4506-9345-17650f4afed5', u'msg_type': u'history_reply', u'session': u'86ab2f8a-2b77-4b00-aa6d-d085c70b8406', u'username': u'kernel'}, 'msg_type': u'history_reply', 'parent_header': {u'date': datetime.datetime(2011, 8, 24, 8, 47, 28, 740000), u'msg_id': u'11d69520-37e8-407b-9a04-7a9a7e773854', u'msg_type': u'history_request', u'session': u'1cd161e2-5196-4140-b237-69d077eaca9f', u'username': u'username'}})
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 IPython-User
mailing list