No 'error' message type sent for cell execution errors
- 主要语言
- Python
- 星标
- 734
- 派生
- 412
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 8
描述
According to the [Messaging documentation](https://jupyter-client.readthedocs.io/en/stable/messaging.html#execution-errors) there should be a message type 'error' sent on the iopub channel when cell execution errors occur. It is meant to mimic the execute_reply shell message but without certain fields. However I am only see a stream message with the error text and a display_data message with the jupyter widget stack trace when there are cell execution errors. Has the 'error' message type been discontinued?
`{'header': {'msg_id': '4c8a15ae-612f3609103b1ff405b9785a_34_9', 'msg_type': 'stream', 'username': 'datalab', 'session': '4c8a15ae-612f3609103b1ff405b9785a', 'date': datetime.datetime(2022, 4, 22, 16, 33, 22, 223826, tzinfo=tzlocal()), 'version': '5.3'}, 'msg_id': '4c8a15ae-612f3609103b1ff405b9785a_34_9', 'msg_type': 'stream', 'metadata': {}, 'content': {'name': 'stdout', 'text': "\n\x1b[0;31mNameError: \x1b[0mname 'b' is not defined\n\nError found at \x1b[0;36mline 5\x1b[0m in \x1b[0;32mfile /tmp/ipykernel_34/2478479356.py\x1b[0m.\n"}, 'buffers': []}
{'header': {'msg_id': '4c8a15ae-612f3609103b1ff405b9785a_34_10', 'msg_type': 'display_data', 'username': 'datalab', 'session': '4c8a15ae-612f3609103b1ff405b9785a', 'date': datetime.datetime(2022, 4, 22, 16, 33, 22, 226738, tzinfo=tzlocal()), 'version': '5.3'}, 'msg_id': '4c8a15ae-612f3609103b1ff405b9785a_34_10', 'msg_type': 'display_data', 'metadata': {}, 'content': {'data': {'text/plain': "Button(description='Click to show stack trace', layout=Layout(height='auto', width='auto'), style=ButtonStyle(…", 'application/vnd.jupyter.widget-view+json': {'version_major': 2, 'version_minor': 0, 'model_id': 'd1ef6870d5a24e1d8b503b9227d2421e'}}, 'metadata': {}, 'transient': {}}, 'buffers': []}`
ipykernel 6.0.1
ipython 7.31.1
ipython-genutils 0.2.0
jupyter-client 7.0.6
jupyter-core 4.8.1
jupyter-packaging 0.10.4
jupyter-server 1.15.5
jupyterlab 3.3.2
jupyterlab-pygments 0.1.2
jupyterlab-server 2.10.3
jupyterlab-widgets 1.0.2
nbclassic 0.3.2
nbclient 0.5.4
nbconvert 6.2.0
nbformat 5.2.0
notebook 6.4.10
----
Originally opened as jupyter/jupyter_client#776 by @matthewgasbarro, migration requested by @blink1073
贡献指南
评估
这个 Issue 还没有评估数据。