When using the rich extension for IPython terminal (%load_ext rich), and when there is an error, I can't see the line from which the error arises, only its line number.
I often have pretty long cells and it's not easy to spot which line is causing the error since there is no lines numbers display in IPython cells.
The default traceback does show the cell line in addition to its line number.
Would it be possible to have the same with the nice traceback of the rich extension?
Code to reproduce
In [1]: import random
...:
...: random.choices([0, 1, 2, 3, 4], k=3, p=[0.1, 0.3, 0.1, 0.25, 0.25])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[1], line 3
1 import random
----> 3 random.choices([0, 1, 2, 3, 4], k=3, p=[0.1, 0.3, 0.1, 0.25, 0.25])
TypeError: choices() got an unexpected keyword argument 'p'
In [2]: %load_ext rich
In [3]: import random
...:
...: random.choices([0, 1, 2, 3, 4], k=3, p=[0.1, 0.3, 0.1, 0.25, 0.25])
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <module>:3 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: choices() got an unexpected keyword argument 'p'
Description
When using the rich extension for IPython terminal (
%load_ext rich
), and when there is an error, I can't see the line from which the error arises, only its line number.I often have pretty long cells and it's not easy to spot which line is causing the error since there is no lines numbers display in IPython cells.
The default traceback does show the cell line in addition to its line number.
Would it be possible to have the same with the nice traceback of the rich extension?
Code to reproduce
Platform
Click to expand
``` ╭─────────────────────────