Open ydmykr opened 4 months ago
Looks like something broke in tqdm, as this doesn't work properly in Jupyter lab either (though different issues).
@ydmykr
As a work around, try using from tqdm.notebook import tqdm
instead of from tqdm import tqdm
import tqdm.notebook
instead of tqdm
I.e.
from time import sleep
from tqdm.notebook import tqdm
for i in tqdm(range(100)):
for j in tqdm(range(10), leave=False):
sleep(0.1)
Thank you for looking into this (minor) issue. The workaround doesn't seem to work for me either however.
https://github.com/user-attachments/assets/e2a8d49b-924d-4fc6-91ee-2748683e4b9c
The workaround works for me in VS Code on Windows:
Version info:
vs code:
Version: 1.92.0 (system setup)
Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124
Date: 2024-07-31T23:26:45.634Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.20348
conda environment:
- python=3.9.19
- ipython=7.33.0
- tqdm=4.66.5
tqdm has been really unreliable on vscode notebooks lately, it stops working suddenly, like it will render on previous cell and will stop working at next cell 🤷 not sure if issue with ipywidgets,tqdm or vscode. For today the issue seems happen while using remote kernels only and I can't get rich progress bar to render either, so not a tqdm issue this time
For today the issue seems happen while using remote kernels only and I can't get rich progress bar to render either, so not a tqdm issue this time
Sorry you are running into this and thank you for sharing this information. If you are using the widgets, then please can you file a new issue, as this issue focuses on non-widgtets (text based) Please do share the information required to repro this.
Here's the codes:
When running in the terminal, it shows correctly. It returns two progress bars, one for the
i
and one for thej
in the loop.However, when running in the jupyter notebook or Interactive Window, only the outermost
i
loop is displayed, and the progress bar of thej
loop contained therein is not displayed.