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] console Console #2222

Closed
Mahrkeenerh opened this issue Apr 25, 2022 · 4 comments
Closed

[BUG] console Console #2222

Mahrkeenerh opened this issue Apr 25, 2022 · 4 comments

Comments

@Mahrkeenerh
Copy link

Running windows, python 3.10,

I literally just did: pip install rich

And then inside idle, run:

from rich.console import Console
console = Console()
console.print([1, 2, 3])

And I just get an error?

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    console.print([1, 2, 3])
  File "C:\Users\samue\AppData\Roaming\Python\Python310\site-packages\rich\console.py", line 1737, in print
    render_options = self.options.update(
  File "C:\Users\samue\AppData\Roaming\Python\Python310\site-packages\rich\console.py", line 1073, in options
    max_height=self.size.height,
  File "C:\Users\samue\AppData\Roaming\Python\Python310\site-packages\rich\console.py", line 1101, in size
    width, height = os.get_terminal_size()
ValueError: bad file descriptor

Am I missing something?

@USLTD
Copy link
Contributor

USLTD commented Apr 26, 2022

I opened #2223 discussion for this issue

@willmcgugan
Copy link
Collaborator

Please try 12.3.0

It shouldn't crash, but Idle doesn't support many features. You will get better results with Windows Terminal.

@github-actions
Copy link

Did I solve your problem?

Why not buy the devs a coffee to say thanks?

@USLTD
Copy link
Contributor

USLTD commented Apr 26, 2022

Please try 12.3.0

It shouldn't crash, but Idle doesn't support many features. You will get better results with Windows Terminal.

@willmcgugan, why do you use that method for terminal size detection?

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

3 participants