Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

No 'error' message type sent for cell execution errors

未关闭
#923 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
jupyter, python
领域
api, backend

调研方向

从链接的 Jupyter Messaging 文档中的 execution-errors 部分开始,使用列出的 ipykernel 和 Jupyter 版本复现报告中的单元执行失败。跟踪执行错误的 iopub 消息,并将观察到的 stream 和 display_data 消息与文档中说明的错误消息类型进行比较。当行为得到澄清,或预期的错误消息能够一致地发出,并且在 repository 提供合适的测试位置时加入回归覆盖,即视为完成。

由索引模型根据 Issue 内容生成。

描述

bug

According to the Messaging documentation 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

主要语言
Python
星标
734
派生
411
平均合并
1 天 2 小时
30 天内合并 PR
9

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ipython/ipykernel 的其他 Issue

查看 ipython/ipykernel 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。