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] Windows: Nothing is printed on Git Bash #2092

Closed
naveen521kk opened this issue Mar 22, 2022 · 3 comments
Closed

[BUG] Windows: Nothing is printed on Git Bash #2092

naveen521kk opened this issue Mar 22, 2022 · 3 comments

Comments

@naveen521kk
Copy link

Describe the bug
On Git Bash's Terminal (Mintty), nothing is printed when run with rich==12.0.0
git bash rich bug
I think this isn't an expected behaviour right? Seeing #988 and #330, it says Git Bash's terminal isn't a real terminal and can't print colours (which is fine), but not printing anything isn't.

The test script I used is really a Hello World script.

from rich import print
print('Hello World')

Also, I noticed when running the same script through subprocess and checking for the output (consider the script below)

import subprocess
import sys
op = subprocess.run(
    [sys.executable, 'test.py'],
    stdout=subprocess.PIPE
)
print(op.stdout)

Again, the stdout contains only b'' (an empty string). This happens even when using cmd.
image
I initially noticed this when tests for the version printing on Manim started to fail ManimCommunity/manim#2630 (comment).

I think both these are related to each other and caused because of replacing Colorama.

Platform

Click to expand

What platform (Win/Linux/Mac) are you running on? What terminal software are you using?
I'm using Windows 11, Git Bash

I may ask you to copy and paste the output of the following commands. It may save some time if you do it now.

If you're using Rich in a terminal:

python -m rich.diagnose
pip freeze | grep rich

1st command: Prints nothing (that's literally the issue here)
2nd command:

❯ pip freeze | grep rich
rich==12.0.0
@willmcgugan
Copy link
Collaborator

Could you possibly check against the current master branch? I think that will fix it.

@naveen521kk
Copy link
Author

naveen521kk commented Mar 22, 2022

Could you possibly check against the current master branch? I think that will fix it.

Nope, it didn't fix.
image
Sorry, the above pip command didn't actually install it. Yes, the master branch did fix it, Thanks.
image

@github-actions
Copy link

Did I solve your problem?

Why not buy the devs a coffee to say thanks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants