This is a development version (latest) and may be unstable.Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython latest / IPython / core / interactiveshell / InteractiveShell / showtraceback

function

IPython.core.interactiveshell:InteractiveShell.showtraceback

source: /IPython/core/interactiveshell.py:2219

Signature

def showtraceback(self, exc_tuple: tuple[type[BaseException], BaseException, AnyType] | None = None, filename: str | None = None, tb_offset: int | None = None, exception_only: bool = False, running_compiled_code: bool = False) → None

Summary

Display the exception that just occurred.

Extended Summary

If nothing is known about the exception, this is the method which should be used throughout the code for presenting user tracebacks, rather than directly invoking the InteractiveTB object.

A specific showsyntaxerror() also exists, but this method can take care of calling it if needed, so unless you are explicitly catching a SyntaxError exception, don't try to analyze the stack manually and simply call this method.

Aliases

  • IPython.InteractiveShell.showtraceback