Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Rich displays ansi on Windows on Console.input() statements #393

Closed
naveen521kk opened this issue Oct 19, 2020 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@naveen521kk
Copy link

naveen521kk commented Oct 19, 2020

Describe the bug
Originally this is from ManimCommunity/manim#552

Manim is a project which uses rich for terminal output and as a logging handler.

Here, console.input(), at

https://github.com/ManimCommunity/manim/blob/3b6519a58678eb84bb31f550a0a4734df58bded3/manim/utils/module_ops.py#L95-L97

produces raw ansi outputs on command prompt. This bug is seen from rich>=7.0.0. This happens to console.input() statements and not console.print() statements.

To Reproduce
rich-failing-to-show-colour-windows

I don't exactly know how to reproduce this outside of Manim. In manim just the command

manim basic.py

will show that error.

Platform
Windows 10.
Command Propmt.
rich>=7.0.0
(anything above v7).

@willmcgugan
Copy link
Collaborator

It looks like legacy windows doesn't like ansi in input() prompts. I'll have a workaround soon. In the meantime, the new Windows terminal should work just fine.

@willmcgugan willmcgugan added bug Something isn't working and removed Needs triage labels Oct 19, 2020
@naveen521kk naveen521kk changed the title [BUG] Rich displays ascii on Windows on Console.input() statements [BUG] Rich displays ansi on Windows on Console.input() statements Oct 19, 2020
@willmcgugan
Copy link
Collaborator

Please try with version 9.0.1

@naveen521kk
Copy link
Author

It's fixed thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants