What is the most common way to see the full error in interactive Python sessions?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is the most common way to see the full error in interactive Python sessions?
Asked by:
81 Viewed 81 Answers

Answer (81)

Best Answer
(281)
In interactive Python sessions (like the standard interpreter or Jupyter notebooks), simply letting an unhandled exception occur will usually display the full traceback by default. Within a `try...except` block, `traceback.print_exc()` is still the most direct way to achieve this.