ipython / ipython/ipykernel

No 'error' message type sent for cell execution errors

Đang mở
#923 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
734
Fork
412
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
8

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.