Closed djoshea closed 1 month ago
Given that we run into the exact same issue with Jupyter Lab/Notebook I'm closing this issue. Jupyter extension builds on top of the protocol implementation of Jupyter, as this issue exists outside of VS Code, I'm closing this.
Applies To
What happened?
If I have the following in a .ipynb notebook opened in VS Code, and I run the following cell, the code executes (got here and got to end both print), but execution never completes, and I need to restart the kernel.
The key line is reassigning
sys.stderr
; all runs fine if I comment this out.I discovered this in trying to figure out what was causing the Python debugger to hang when debugging a cell in Jupyter notebook, which was running jax / equinox code, that overwrites the stderr and causes havoc. If I step through this code in the debugger, the debugger also hangs.
VS Code Version
Version: 1.93.0 Commit: 4849ca9bdf9666755eb463db297b69e5385090e3 Date: 2024-09-04T13:02:38.431Z (2 days ago) Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.93.0 Chrome/124.0.6367.243 Electron/30.4.0 Safari/537.36
Jupyter Extension Version
v2024.8.0
Jupyter logs
Coding Language and Runtime Version
Python 3.12 in a venv managed by Rye
Language Extension Version (if applicable)
Python v2024.14.0
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local