After the recent update of vscode my error messages in the python interactive window started to look like this:

File c:\Users\user\anaconda3\lib\site-packages\pandas\core\internals\construction.py:845, in to_arrays(data, columns, dtype)
ref='c:\Users\user\anaconda3\lib\site-packages\pandas\core\internals\construction.py:0'>0</a>;32m    842     data = [tuple(x) for x in data]
ref='c:\Users\user\anaconda3\lib\site-packages\pandas\core\internals\construction.py:0'>0</a>;32m    843     arr = _list_to_arrays(data)
ref='c:\Users\user\anaconda3\lib\site-packages\pandas\core\internals\construction.py:1'>1</a>;32m--> 845 content, columns = _finalize_columns_and_data(arr, columns, dtype)
ref='c:\Users\user\anaconda3\lib\site-packages\pandas\core\internals\construction.py:0'>0</a>;32

With ref='fname..' in each line for any external module

How is it possible to stop showing this "ref=.." information? (just code and filename on the top in error block, like it was before)

Help: About

Version: 1.84.0 (user setup)
Commit: d037ac076cee195194f93ce6fe2bdfe2969cc82d
Date: 2023-11-01T11:29:04.398Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

Python extension: v2023.20.0

Jupyter extension: v2023.10.1003070148

1

There are 1 answers

0
starball On BEST ANSWER

I can reproduce this behaviour regardless of the jupyter.formatStackTraces setting's value (so I don't think it has anything to do with recent changes regarding non-Jupyter stack trace improvements). There's no way it's not a bug. I've gone and raised a bug ticket: Stack traces are showing unformatted/broken links (again?) #14666. Now we wait. Give the ticket a thumbs up to show that you're also having the issue. Please avoid making noisy comments there like ones that just consist of "+1" / "me too". Such comments are fine if you add repro info that isn't already covered by previous comments.

Maintainer Aaron Munger has responded that this is an issue in the built-in renderer and has drafted a Pull Request to fix the issue: fix stack trace linking #197572. The fix should be in VS Code insiders by the time you're reading this, and eventually will be in the November 2023 (1.85.0) stable release.

Fun fact, things like this have happened before (though I think in different ways / with different causes). Ex. Why does VS Code 1.82.1 create HTML links in Notebook error outputs?.