Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Exception in script in ~/.ipython/profile_default/startup causes other scripts to not execute

オープン
#1,158 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
jupyter-notebook, python
領域
backend

調査の方向性

~/.ipython/profile_default/startup/a.py と b.py で失敗を再現し、その後、kernel の startup-script 実行のエントリポイントを追跡してください。Jupyter notebook で動作を確認してください。後のスクリプトは、前のスクリプトで例外が発生した後も実行されるべきであり、失敗したスクリプトはエラーを示す何らかの表示を生成するべきです。

索引モデルが issue の本文から書いたものです。

説明

Summary

If one of the files in your ~/.ipython/profile_default/startup throws an exception, then any other file that executes later (i.e. is lexicographically higher, because startup scripts are executed in lexicographical order) will not be executed.

To reproduce

  1. Run these commands:
echo 'raise Exception' > ~/.ipython/profile_default/startup/a.py
echo 'x = 123' > ~/.ipython/profile_default/startup/b.py
  1. Open a Jupyter notebook, type x into a cell, and press enter

Expected behavior

It outputs 123. Ideally it also shows some information indicating that a.py failed to run.

Actual behavior

It shows NameError: name 'x' is not defined. It also doesn't give any indication that a.py (or b.py) failed to run.

System configuration

Kernel version:

Python 3.11.6 (main, Oct  2 2023, 20:46:14) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.16.1 -- An enhanced Interactive Python. Type '?' for help.

Python packages:

$ python3 -m pip show ipykernel | grep Version
Version: 6.25.2

OS version: macOS 13.3.1

Notes

If you run

mv ~/.ipython/profile_default/startup/{a,c}.py

then it will successfully define x (because b.py runs before c.py).

主要言語
Python
スター
734
フォーク
411
平均マージ
1日 2時間
マージ済み PR(30日)
9

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ipython/ipykernel のほかの issue

ipython/ipykernel の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。