-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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] log formating wrapping line numbers #1019
Comments
Did you resize the terminal after running the code? If not, it suggests that the terminal size is incorrectly detected. Do you have a COLUMNS env var set? What do you get when you run this: import shutil
shutil.get_terminal_size() And does it match your terminal size? |
Thanks for the response
No, i have also tested it in a fresh window and using both konsole and yakuake and get the same issue (also tried sh, bash and zsh). however using a real tty (i.e. ctrl + alt + f1) works as expected
yes
yes
|
I think Rich may not be respecting the COLUMNS env var. I'll have a fix in the next minor version. |
please ping if you want a tester |
Just notice something. The filenames in the right hand column have superfluous backslashes. Those are terminal links, which are a relatively new addition to terminals. If terminals follow the spec precisely then the links won't render if not supported by the terminal, but it looks like some of the characters are. I'm fairly certain that's a bug in the terminal app. As a workaround, you can add |
Ahh awesome that worked a treat
Im unsure if this is a bug or expected if the latter please close the issues other wise happy to help test anything if needed, thanks |
It's a bug in your terminal software I'm afraid. You could try raising an issue with that project. |
Thanks i did some digging for otheres who may hit this issue: As far as i can tell The feature was added to konsole in v20.11.80 (all though i couldn;t find a decent changelog so could have been earlier). im using buster and 18.04.0 so this is to be expected. As to yakuake afaik this uses konsol as the emulator Also found this gist which seems usefull to add here |
I'm getting this same error with MacOS native terminal and |
Describe the bug
When printing with either
Console().log()
or using theRichHandler()
logging handler line numbers are warped and printed on the next line, see below:To Reproduce
Platform
The test report is using a the debian:buster image after running the following commands
Diagnose
I may ask you to cut and paste the output of the following commands. It may save some time if you do it now.
python -m rich.diagnose
python -m rich._windows
pip freeze | grep rich
The text was updated successfully, but these errors were encountered: