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
.write() clashes with nested bars on python 3.6 #398
Comments
It's a Python 3.5 issue as well. Even just the presence of a second bar will keep writes from being shown. Here is my minimized example: from time import sleep
from tqdm import tqdm
def two_bars_with_surrounding_write():
tqdm.write("starting")
sleep(1)
a = tqdm(total=10)
b = tqdm(total=100)
sleep(1)
a.update()
b.update()
tqdm.write("finished")
sleep(1)
tqdm.write("finished again")
sleep(1)
two_bars_with_surrounding_write()
"""starting text shows but neither finished text shows""" Ubuntu 16.04 with Guake or stock terminal. |
@duckythescientist Could you try the small change suggested in #399 and see if it fixes your problem? It seems to do that in my environment. |
@staffanm That fixes the problem when I have two progress bars and doing writes, but when I have one bar then do a write, the write works, but the bar disappears. However, if I always |
Good catch @duckythescientist -- I've updated the PR accordingly |
Starting with the example code given for nested progress bars, I've tried the following:
Under python 2.7 this works as expected, the log messages are written above the three nested progress bars at the bottom of the console.
On python 3.6, the log messages appear to overwrite the progress bars, which are rapidly scrolled off-screen (by new log messages) as soon as they are updated.
Maybe this is related to #348 -- applying the patch suggested in #331 does not fix the problem, however.
This is on MacOS Sierra, using the stock Terminal app.
The text was updated successfully, but these errors were encountered: