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
Extra character in watch colour mode on Ubuntu 17.10 #32
Comments
Which version of |
I have the same issue. This is what I get with `watch gpustat --color I'm also on Ubuntu 17.10, using the Edit: I took a look at it and as far as I can tell, the issue has something to do with
|
I'll look into the bug. Working on setting a test environment on docker. |
I tested as the following and found that the new # set force_color=True for gpustat --color
python test_gpustat.py > fc.log
cat fc.log # displays as normal
watch --color -n 1 cat fc.log # many ^ tails There's a great PR implementing watch/top like monitoring function, which may solve the problems caused by The original output log file is attached fc.log on Ubuntu 17.10. |
For other environments such as macOS (my local), I can't reproduce the issue with the same version of watch The attachment is my output fc.log (in macOS), generated using your instructions. We can see the resetting sequence is @Stonesjtu Can you please upload your fc.log file for comparison? If so, I suspect blessings (ncurses) is in charge of this. Can you verify this?
|
The output on mac renders as normal without extra
And on my PC (Ubuntu 16.04), the
|
Right. It is from A problem is that One easiest way is simply truncate additional control characters ( |
In some environments (Ubuntu 17.10), the control character sequence for resetting colors/attributes (sgr0) can't be recognized in watch command. As a result, an additional character may be shown. Using different termstr seems to resolve this issue, in that `term.normal` returns a compatible control sequence.
I've come up with a good workaround. Can you please try it out by installing the latest one from master branch? Still, we would need a test case and travis setup with Ubuntu 17.10. |
I no longer have this issue when using the latest version of the master branch. |
Great, thanks! But let me keep this issue open for a while until I add a test/travis setup :) |
it's time to merge the builtin top watch support to workaround strange bugs caused by watch. |
I have reverted 8d3f917, because with the @mjmikulski @Stonesjtu Would you be available to verify it again on your environments? (with |
Edit: My suggestion is already in mainline. For anyone else seeing this from google, if there isn't a new release then get a mainline version of this via |
This is now released as 0.5.0. Sorry for making it a bit late. |
- To prevent blinking cursors, do not re-store cursor locations - Workaround sgr0 character issues (#32) again - Misc: various style cleanups
When I use command
watch --color -n1.0 gpustat --color
I get a lot of extra^
: https://imgur.com/a/A9FxcThis problem doesn't occur without
watch
.I'm on Ubuntu 17.10 with wayland.
The text was updated successfully, but these errors were encountered: