-
Notifications
You must be signed in to change notification settings - Fork 555
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
An error about stty #140
Comments
indicates that the os.popen('stty size', 'r').read().split() line is not returning the expected output. This is likely because the stty size command did not return the expected result.The stty size command is used to get the size of the terminal window in rows and columns. It should return something like 24 80 to represent a terminal with 24 rows and 80 columns. However, if your terminal or environment does not support the stty size command, it will return an empty string or something different, leading to the error you encountered. To fix the problem, you can handle cases where the stty size command does not return the expected output. You can do this by using a try-except block to catch the error and provide a default value for term_width and term_height. Here's an example of how to do it: ** try: ** |
Thank you very much,I have fixed the issue |
请问怎么解决的呀 我也是有这个问题 |
_, term_width = os.popen('stty size', 'r').read().split()
ValueError: not enough values to unpack (expected 2, got 0) Can you tell me how to fix the problem?
The text was updated successfully, but these errors were encountered: