try: from rich import pretty, traceback pretty.install() traceback.install() except ImportError: pass