microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.3k stars 294 forks source link

Unable to open python file when clicking from cell output in visual studio code server #16137

Open johanlamm opened 1 month ago

johanlamm commented 1 month ago

Environment data

Expected behaviour

Clicking on the line number in the cell output of a traceback should take me to the file

Actual behaviour

Error message "Unable to open 'script.py' The editor could not be opened becouse the file was not found

Steps to reproduce:

On visual studio server, connect to the remote and create the files below

minimal.ipynb:

from script import failfunction failfunction()

script.py: def failfunction(): return fail

Cell output:

NameError Traceback (most recent call last) Cell In[2], line 2 1 from script import failfunction ----> 2 failfunction()

File c:\Users\XXX\script.py:2, in failfunction() 1 def failfunction(): ----> 2 return fail

NameError: name 'fail' is not defined

Clicking on line two you are supposed to open the python file but instead get error

Image