question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError: Tag "<locals>" does not corespond to any known ansi directive, make sure you did not misspelled it

See original GitHub issue

I get this error when deploying app on Heroku, locally all seems fine. Any idea how can I fix this?

ValueError: Tag "<locals>" does not corespond to any known ansi directive, make sure you did not misspelled it

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Delgancommented, Feb 26, 2020

Which Loguru version are you using? This error may happen if you use opt(colors=True) (formerly opt(ansi=True)), because Loguru will try to convert markup found in logged string to ansi color codes. If a markup is found but does not correspond to any known color (like <locals>), then an error is raised. It may also happen depending on the format used by your handler. You can try to .remove() the default handler, and .add() a new one while enforcing colorize=False.

I can’t help you much without seeing code. 😕

0reactions
Delgancommented, Aug 27, 2022

@khanfarhan10 Ideally, opt(colors=True) should be used only locally where you know the message won’t contain any markup tag.

However, you can escape the invalid tag as follow:

logger.info("Logger is enabled\<space>")
Read more comments on GitHub >

github_iconTop Results From Across the Web

Network does not generalize - Image.sc Forum
Problem: For a couple of weeks I have been trying to train a network on an extremely simple and uniform human hand movement...
Read more >
Bug listing with status RESOLVED with resolution FIXED as at ...
Bug:2 - "How do I attach an ebuild. ... Bug:106 - "dircolors is not useable with zsh, and may be broken" status:RESOLVED resolution:FIXED...
Read more >
Changelog — Python 3.11.1 documentation
So we keep the warning and no longer claim that literal_eval is safe. ... when the Python test suite is run with the...
Read more >
3a2425a5aed1bef93dab954745...
... class do not take into account locations corresponding to synthetic, ... b9a1c53: Merge branch 'safe-sudo-escaping' 7d973ec: no yourkit in pycharm ce ...
Read more >
beets Documentation - Read the Docs
for every album you import. Option (a) is really fast, but option (b) makes sure all your songs' tags are exactly right from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found