"AssertionError: Missing message part." in ipython-qtconsole --pure #508

Closed
mspacek opened this Issue Jun 8, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@mspacek
Contributor

mspacek commented Jun 8, 2011

Running ipython-qtconsole --pure and then entering something into the console that raises an error (like sdfsdf) causes this:

{'content': {'user_variables': [], 'code': 'sdfsdf\n', 'user_expressions': {}, 'silent': False},
 'header': {'username': 'mspacek', 'msg_id': 0, 'session': 'd3ee91be-fedf-44e6-839a-079946789ed9'},
 'msg_type': 'execute_request',
 'parent_header': {}}
{'content': {u'status': u'error', u'ename': u'NameError', u'evalue': u"name 'sdfsdf' is not defined", u'traceback': ['Traceback (most recent call last):\n', '  File "/home/mspacek/source/ipython/IPython/zmq/pykernel.py", line 122, in execute_request\n    exec comp_code in self.user_ns, self.user_ns\n', '  File "<zmq-kernel>", line 1, in <module>\n', "NameError: name 'sdfsdf' is not defined\n"]},
 'header': {'username': u'kernel', 'msg_id': 2, 'session': '808fb1bb-750f-4df9-9787-db19d2f7506a'},
 'msg_type': u'execute_reply',
 'parent_header': {'username': 'mspacek', 'msg_id': 0, 'session': 'd3ee91be-fedf-44e6-839a-079946789ed9'}}
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
/home/mspacek/bzr/neuropy/qt/neuropy/<string> in <module>()

/home/mspacek/source/ipython/IPython/zmq/entry_point.pyc in main()
    156         namespace = make_argument_parser().parse_args()
    157         kernel = make_kernel(namespace, kernel_factory, OutStream, DisplayHook)
--> 158         start_kernel(namespace, kernel)
    159     return main
    160 

/home/mspacek/source/ipython/IPython/zmq/entry_point.pyc in start_kernel(namespace=Namespace(hb=51618, ip='127.0.0.1', no_stderr=Fa...e, parent=True, pub=33482, req=45109, xrep=55285), kernel=<IPython.zmq.pykernel.Kernel object>)
    147 
    148     # Start the kernel mainloop.
--> 149     kernel.start()
    150 
    151 

/home/mspacek/source/ipython/IPython/zmq/pykernel.pyc in start(self=<IPython.zmq.pykernel.Kernel object>)
     79                 print >> sys.__stderr__, "UNKNOWN MESSAGE TYPE:", omsg
     80             else:
---> 81                 handler(ident, omsg)
        global IJd = undefined
        global n = undefined
        global X = undefined
        global S = undefined
        global NR1 = undefined
        global u = undefined
     82 
     83     def record_ports(self, xrep_port, pub_port, req_port, hb_port):

/home/mspacek/source/ipython/IPython/zmq/pykernel.pyc in execute_request(self=<IPython.zmq.pykernel.Kernel object>, ident='d3ee91be-fedf-44e6-839a-079946789ed9', parent={'content': {'user_variables': [], 'code': 'sdfs...arent_header': {}, 'msg_type': 'execute_request'})
    143         print>>sys.__stdout__, Message(reply_msg)
    144         if reply_msg['content']['status'] == u'error':
--> 145             self._abort_queue()
    146 
    147     def complete_request(self, ident, parent):

/home/mspacek/source/ipython/IPython/zmq/pykernel.pyc in _abort_queue(self=<IPython.zmq.pykernel.Kernel object>)
    181                     break
    182             else:
--> 183                 assert ident is not None, "Missing message part."
    184             print>>sys.__stdout__, "Aborting:"
    185             print>>sys.__stdout__, Message(msg)

AssertionError: Missing message part.

Shortly thereafter, I get the dialog box informing me that the kernel has been inactive for 3.00 seconds, and do I want to restart...

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Jun 8, 2011

Member

should be fixed by #509

Member

minrk commented Jun 8, 2011

should be fixed by #509

@mspacek

This comment has been minimized.

Show comment
Hide comment
@mspacek

mspacek Jun 8, 2011

Contributor

Yup, that fixed the error. It still prints out these long messages though, for diagnostics I guess:

{'content': {'user_variables': [], 'code': 'sdfsdfs\n', 'user_expressions': {}, 'silent': False},
 'header': {'username': 'mspacek', 'msg_id': 0, 'session': '19e3a398-c407-436c-bd88-2328bd37c0a9'},
 'msg_type': 'execute_request',
 'parent_header': {}}
{'content': {u'status': u'error', u'ename': u'NameError', u'evalue': u"name 'sdfsdfs' is not defined", u'traceback': ['Traceback (most recent call last):\n', '  File "IPython/zmq/pykernel.py", line 122, in execute_request\n    exec comp_code in self.user_ns, self.user_ns\n', '  File "<zmq-kernel>", line 1, in <module>\n', "NameError: name 'sdfsdfs' is not defined\n"]},
 'header': {'username': u'kernel', 'msg_id': 2, 'session': '3e6b5417-8781-48cf-a88d-6818c5270f44'},
 'msg_type': u'execute_reply',
 'parent_header': {'username': 'mspacek', 'msg_id': 0, 'session': '19e3a398-c407-436c-bd88-2328bd37c0a9'}}
Contributor

mspacek commented Jun 8, 2011

Yup, that fixed the error. It still prints out these long messages though, for diagnostics I guess:

{'content': {'user_variables': [], 'code': 'sdfsdfs\n', 'user_expressions': {}, 'silent': False},
 'header': {'username': 'mspacek', 'msg_id': 0, 'session': '19e3a398-c407-436c-bd88-2328bd37c0a9'},
 'msg_type': 'execute_request',
 'parent_header': {}}
{'content': {u'status': u'error', u'ename': u'NameError', u'evalue': u"name 'sdfsdfs' is not defined", u'traceback': ['Traceback (most recent call last):\n', '  File "IPython/zmq/pykernel.py", line 122, in execute_request\n    exec comp_code in self.user_ns, self.user_ns\n', '  File "<zmq-kernel>", line 1, in <module>\n', "NameError: name 'sdfsdfs' is not defined\n"]},
 'header': {'username': u'kernel', 'msg_id': 2, 'session': '3e6b5417-8781-48cf-a88d-6818c5270f44'},
 'msg_type': u'execute_reply',
 'parent_header': {'username': 'mspacek', 'msg_id': 0, 'session': '19e3a398-c407-436c-bd88-2328bd37c0a9'}}
@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Jun 9, 2011

Member

Yes, that's debugging information. It was all moved over to logging.debug in ipkernel, but apparently nobody bothered to touch pykernel. I'll have that cleaned up one the newapp code is merged.

Member

minrk commented Jun 9, 2011

Yes, that's debugging information. It was all moved over to logging.debug in ipkernel, but apparently nobody bothered to touch pykernel. I'll have that cleaned up one the newapp code is merged.

@minrk minrk closed this in 3fdb23a Jun 10, 2011

pombredanne added a commit to pombredanne/ipython that referenced this issue Jun 17, 2011

@minrk minrk referenced this issue Jun 10, 2011

Merged

i508 #509

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment