From e54c05dd21f4c03bc626dad8776af1f35cea838a Mon Sep 17 00:00:00 2001 From: MinRK Date: Mon, 21 Nov 2011 11:12:23 -0800 Subject: [PATCH] explicitly ignore iopub messages not associated with a cell in the notebook An error would previously be raised whenever iopub traffic arrived that did not originate with the notebook (e.g. pylab welcome, or qtconsole output). This error was not in a block that would actually cause problems, so actual functionality was not affected. --- IPython/frontend/html/notebook/static/js/notebook.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 108f4c99a..ead17129a 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -726,6 +726,11 @@ var IPython = (function (IPython) { // console.log(reply); var msg_type = reply.header.msg_type; var cell = this.cell_for_msg(reply.parent_header.msg_id); + if (!cell){ + // message not from this notebook + console.log("Received IOPub message not caused by one of my cells"); + return; + } var output_types = ['stream','display_data','pyout','pyerr']; if (output_types.indexOf(msg_type) >= 0) { this.handle_output(cell, msg_type, content);