From dd634c91cecbc44ce0430c27ca0133ec7d4b602b 2011-11-21 19:20:58 From: MinRK Date: 2011-11-21 19:20:58 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. --- diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 108f4c9..ead1712 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);