-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
Describe the bug
rich.print does not print something that print does, breaking with:
NotRenderableError: Unable to render (<console width=93 ColorSystem.TRUECOLOR>, ConsoleOptions(legacy_windows=False, min_width=1, max_width=93, is_terminal=False, encoding='utf-8', justify=None, overflow=None, no_wrap=False, highlight=None)); A str, Segment or object with __rich_console__ method is required
To Reproduce
from unittest.mock import MagicMock
ListProxy = MagicMock("ListProxy")
y = ListProxy()
y[0] += 1
rich.print(*y.mock_calls)If you remove the rich. or the *, it works. I'm assuming it is suppose to fall back to repr/str, or is it supposed to break? The list containing it works just fine, just not singled out. This is a fairly unusual thing to print, I know, was working on a tutorial.
Platform
macOS 11 Intel, normally iTerm2 though I was in JupyterLab 3 for this, 9.7.0 from conda-forge.
Reactions are currently unavailable