Should initialization errors be exposed to the user?
还没有人认领这个 Issue。
评估
调研方向
首先阅读 issue 中链接的 ipykernel/kernelapp.py 和 IPython/core/shellapp.py 中的初始化路径,重点关注 exec_lines 失败是如何被处理和抑制的。确定让初始化错误到达 notebook 控制台的预期方式,然后定义测试和验收标准,以便显示这些错误,同时不将其附加到第一个单元格的输出中。
由索引模型根据 Issue 内容生成。
描述
Currently, if user configures InteractiveShellApp.exec_lines and it fails, there is no way for them to see the error in notebook.
For example set c.InteractiveShellApp.exec_lines=["raise ValueError()"].
This is visible in IPython/jupyter-server because it gets written to the terminal, but it does not show up in the notebook. There is even explicit code making sure that it won't be attached to the output of the first cell once it gets run:
With code to the same effect in IPython itself: https://github.com/ipython/ipython/blob/cc614bdc1d3f61303e265c26d593d384e4a90d1e/IPython/core/shellapp.py#L341-L360
I wonder if we should emit a special message for any output so that it would be shown in the Notebook console? The same way as unhandled ipywidget messages land in the console?
I mean this log console:
- 主要语言
- Python
- 星标
- 734
- 派生
- 411
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ipython/ipykernel 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 66/100
查看 ipython/ipykernel 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
learningequality/ricecooker#747 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 76/100
run-llama/llama_index#23199 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
KhronosGroup/glTF-Blender-IO#2769 ·