GreyElaina/richuru

KeyError while trying to print dictionaries or json-like strings

chiyuki0325 opened this issue · 2 comments

>>> import richuru
>>> richuru.install(rich_traceback=False)
>>> from loguru import logger

>>> logger.warning('{"Hello": "world!"}')
[04/24/24 21:51:12]
WARNING  {"Hello": "world!"}                                                               <stdin>:1

>>> logger.warning('{"Hello": "world!"}', style="bold cyan1")
[04/24/24 21:51:21]
ERROR    Exception:                                                                   richuru.py:102
         Traceback (most recent call last):

         > File "<stdin>", line 1, in <module>

         KeyError: '"Hello"'

It's not my fault, loguru's.

image

You must use {{ & }} to get literal output.
image