-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipykernel 6.0.1 breaks interactive debugger #6534
Comments
Looking into this. I'm currently seeing slightly different behavior. Looks to me like it's matching against a temp file and not against the actual .py file that I started the debug with. Also could you pull the output from the "Jupyter" section of the output window? If you save that in a file and attach it here I can look it over. |
@IanMatthewHuff yes, exactly. It happens with the debug cell feature. As far as I can tell cell runs normally when not using this feature. |
@HDavidEspinosa Thanks, just making sure that we had the same scenario. Could you grab those logs from the Jupyter output section? I think that would need to see those next, since the repro that I currently see is different. |
FYI @IanMatthewHuff I can reproduce the behavior described and @rebornix can reproduce the behavior that you're seeing 🙃 we just ran into this issue as well. Dumping the Jupyter output log in case it's helpful to whoever picks this bug up
|
Yeah, I think that @rebornix is on Mac if I'm correct, and you are on Windows. Might be a platform diff with 'dumpCell'? pinging @DavidKutu to make sure he's aware as well. Not sure if the logging really buys us much here, all we see is a cell hash getting generated. Will just have to dig in. |
Ok, so... Finally managed to reproduce the bug. I took an ipynb file I had, exported it to py script. Once I save the script, I ran some cells using the "Run Above" button. Then I tried to run the next cell using the "Debug Cell" option. At that point, a new editor popped up with the message. Could not load source 'c:\Users\david\AppData\Local\Temp\ipykernel_16772\1353980299.py': Unable to retrieve source for C:\Users\david\AppData\Local\Temp\ipykernel_16772\1353980299.py. I attach the logs for Jupyter using two separate environments. issu_data_second_dump.txt The wired thing is that just before, I had cloned the original environment used in the first issue data file, I updated that clone environment, and all worked fine. Then I updated the original environment, tried it again, and the problem appeared (issue_data.txt file). Then I returned to the clone environment, and, sure enough, the problem appeared as well (issu_data_second_dump.txt). I hope this helps |
Soo... I just rolled back the last updates of the environment. The following are the changes: intel-openmp {2021.3.0 (conda-forge/win-64) -> 2021.2.0 (conda-forge/win-64)} And the "Debug cell" is working fine. So I attach those logs as well: Again, I hope this helps. |
I'm guessing that's because your environment downgraded ipykernel from 6.0.1 to 5.5.5, which doesn't have this problem. |
This issue is being tracked by #6560 |
Looks like the logic for generation of python files for cells has changed in latest version of IPython. This is what was used previously by ipython: However that code is no longer used, heres the new code that makes use of the new naming convention: |
Yeah we try to attempt to match the algorithm. So we'll have to change based on the version of ipykernel or use the env variable (which I guess we'd have to set before every cell execution) |
I've got it working with the env variable. |
How to test:
|
Issue Type: Bug
I am working with anaconda as my Python distro and in my environment I updated ipykernel to the 6.0.1 version today.
As soon as I did this the interactive debbugger started popping out the following error:
Could not load source 'c:\Users\david\AppData\Local\Temp\ipykernel_17508\2969028694.py': Unable to retrieve source for C:\Users\david\AppData\Local\Temp\ipykernel_17508\2969028694.py.
Downgraded ipykernel to 5.5.5 all went back to normal.
Something in this upgrade is breaking the debugger when running through the interactive interpreter.
Extension version: 2021.6.999662501
VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:07.755Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: