You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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).
The text was updated successfully, but these errors were encountered:
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
x
into a cell, and press enterExpected 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 thata.py
(orb.py
) failed to run.System configuration
Kernel version:
Python packages:
OS version: macOS 13.3.1
Notes
If you run
then it will successfully define
x
(becauseb.py
runs beforec.py
).The text was updated successfully, but these errors were encountered: