I ran some python code block on a Jupyter Notebook and got
An exception has occurred, use %tb to see the full traceback.
error/warning followed by a single line of traceback.
I want to see the full traceback as suggested. But I didn't understand what %tb
is how and where I can use it. Is it an argument that I should've given to jupyter
command or is it something I should've used in python code (sth like printf("%tb", whatIsSupposedToBeHere)
)?
I have searched both this error message and ways to read tracebacks in python and j. notebook. I tried some answers to this and that but couldn't get anything useful.
ps. This is not an XY problem.
Yes I want to see full traceback (X) and I am asking a subproblem that encountered while trying a solution particularly how to use %tb
(Y). However, i want to learn the solution of Y independent of its relation to solving X.
%tb
is an IPython "magic" commandJust type it into an empty cell of the Jupyter Notebook, and it will show the traceback of the last error you had on that kernel.
More info: Built-in magic commands — IPython documentation § %tb