Skip to content
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

Mix of printing text and tqdm in VS Code Jupyter notebook results in multiple lines #1479

Open
5 of 6 tasks
GustawOhler opened this issue Jun 15, 2023 · 1 comment
Open
5 of 6 tasks

Comments

@GustawOhler
Copy link

  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
  • I have visited the [source website], and in particular
    read the [known issues]
  • I have searched through the [issue tracker] for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    4.65.0 3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0] linux
    working on VS Code (1.79) jupyter (extension ver 2023.5) notebook

I'm not sure if it's belong here (I hope so). If I execute this code:

from tqdm import tqdm
import time

print("Data for this query haven't changed.")
for i, j in enumerate(tqdm(range(30))):
    time.sleep(i/200)

In my jupyter notebook the result is like this:

image

Without print it's alright again. Then if I restore print back again tqdm display is ok again but printed text is gone:
image

@joelostblom
Copy link

It looks like you are using notebook in VS Code. I believe you need to use the tqdm notebook progress bars for that to work correctly https://github.com/tqdm/tqdm/?tab=readme-ov-file#ipythonjupyter-integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants