Open eendebakpt opened 3 years ago
I want to point out that this doesn't happen on Linux, i.e. I can see the RecursionError
raised in both Qtconsole and Spyder.
I can confirm this is still happening (IPython 8.7.0
) on Python 3.9 and 3.10, but not on Python 3.11. The Spyder kernel is a little bit more forthcoming in the error message:
Python 3.10.8 | packaged by conda-forge | (main, Nov 24 2022, 14:07:00) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython -- An enhanced Interactive Python.
In [1]: def foo():
...: foo()
In [2]: foo()
Windows fatal exception: stack overflow
Main thread:
Current thread 0x0000454c (most recent call first):
File "C:\Users\hangleiter\AppData\Local\Temp\ipykernel_6432\1578689351.py", line 2 in foo
File "C:\Users\hangleiter\AppData\Local\Temp\ipykernel_6432\1578689351.py", line 2 in foo
...
Restarting kernel...
As @ccordoba12 stated, on Linux this is not an issue.
The following minimal example results in the
qtconsole
restartingwith error message
The same happens within a Spyder console
The minimal example has a clear problem: an infinite recursion. But in a normal python session this results in a normal exception with clear error message, e.g.
Within
qtconsole
at least a clear error message should be generated. And preferably the console not restarted. Withinjupyter notebook
executing the minimal example also results in a crash without proper error messages.