VS Code ipython/jupyter interactive environment not showing full traceback?

Viewed 274

Not sure if this is a VS code or Jupyter problem but I have been using Jupyter in VS Code (specifically using the "# %%" implementation outlined here).

I noticed recently that my error tracebacks are not showing the full traceback, but rather only the first layer.

For example, I made a simple dummy error (hiding my path on purpose here):

ran in interactive mode:

NameError
Traceback (most recent call last)
[PATH] in <module>
----> 97 py_getAnnotation(["a", "b"])

[PATH] in py_getAnnotation(experiments)

NameError: name 'hold_s' is not defined

But running script normally:

Traceback (most recent call last):
  File [PATH], line 97, in <module>
    py_getAnnotation(["a", "b"])
  File [PATH], line 77, in py_getAnnotation
    hold_s.name = col
NameError: name 'hold_s' is not defined

I recently had to switch from Mac to Windows. So I am not sure if this is a VS Code thing, an iPython setting/version thing, or maybe even an OS-specific thing.

I've never had this happen before. Any ideas would be appreciated.

NOTE: I tried uninstalling ipython dependencies and reinstalling.

I have tried running %xmode as suggested in an old post

Edit: I have also copied and pasted my code into a jupyter notebook at that error traceback is fine. So seems to be VS Code Specific.

Edit: Downgrading VS Code to an earlier version worked! But if anyone has an idea why it happened in the first place that would be appreciated.

0 Answers
Related