-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When backend=False, a blank line is still printed to the console.
This seems to be caused by the fp.write('\n') in tqdm.close(). (if leave=False, it prints \r instead)
I've worked around this by passing a handle to os.devnull as file=. I'm not sure what the best way to work around in stqdm itself would be. It seems like a bug in tqdm that it always prints this if display is never called.
To Reproduce
streamlit run this:
import time
import stqdm
print("before")
for _ in stqdm.stqdm(range(2), backend=False):
time.sleep(0.5)
print("after")Prints:
before
after
Expected behavior
When backend=False, nothing is printed at all. (The above example would have no blank line between before and after.)
Desktop (please complete the following information):
- OS: Linux
- Browser: firefox
- Version of streamlit: 1.41.1
- Version of stqdm: 0.0.5
- Version of tqdm: 4.67.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working