textual icon indicating copy to clipboard operation
textual copied to clipboard

How to completely disable rich tracebacks

Open sam-kleiner opened this issue 2 years ago • 0 comments

To be added by @willmcgugan

I was wondering if there is a way to completely disable rich tracebacks?

What I have tried in my main.py Here I am purposely raising an error in the __rich_console__ method that ends up being rendered

import rich
import textual
from rich.traceback import install

import myapp

install(suppress=[myapp, rich, textual])

myapp.MyApp.run(log="textual.log")

Rich itself does not show the pretty tracebacks if I print the panel directly instead of from the widget

from rich import print
from rich.panel import Panel

import myapp

panel = Panel(myapp.MyClass())
print(panel)

sam-kleiner avatar Apr 03 '22 09:04 sam-kleiner