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

Blank lines of nested progress bar in VSCode + ipynb #1287

Closed
5 of 6 tasks
Joilence opened this issue Jan 10, 2022 · 4 comments
Closed
5 of 6 tasks

Blank lines of nested progress bar in VSCode + ipynb #1287

Joilence opened this issue Jan 10, 2022 · 4 comments
Assignees
Labels
invalid ⛔ Not-an-issue or upstream (not-our-issue) p2-bug-warning ⚠ Visual output bad submodule-notebook 📓 Much web such IDE

Comments

@Joilence
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:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)

4.62.3 3.8.2 (default, Mar 25 2020, 11:22:43)
[Clang 4.0.1 (tags/RELEASE_401/final)] darwin
VSCode 1.63.2, macOS 12.1 (M1).

Unable to correctly display nested progress bar in VSCode + .ipynb, always leaves a blank line when a sub-loop is finished.

I'm aware that in the known issue it is mentioned that tdqm require support for moving cursors up to the previous line which, for e.g., consoles of PyCharm does not support, but it does not mention VSCode. I'm not sure if VSCode has the same lack of support.

Code:

import tqdm, sys
# from tqdm.auto import tqdm # this does not work to detect notebook env
import time
import sys
from tqdm.notebook import tqdm
for _ in tqdm(range(5)):
    for _ in tqdm(range(20), leave=False):
        for _ in tqdm(range(50), leave=False):
            # do something, e.g. sleep
            time.sleep(0.01)

CleanShot 2022-01-10 at 01 18 48@2x

@dyspr0sium
Copy link

dyspr0sium commented Feb 3, 2022

The same issue with blank newlines in nested loops occurs in .ipynbs opened in jupyter lab, using tqdm.auto.tqdm. The same .ipynb opened in jupyter notebook does not display this issue.

@aldanor
Copy link
Contributor

aldanor commented Mar 16, 2022

Wonder if there's any news/thoughts on this? Just encountered this as well in vscode which is pretty sad. Looks like there's some div containers generated that don't/can't get properly removed?

@aldanor
Copy link
Contributor

aldanor commented Mar 16, 2022

2022-03-16_23-37-09.mp4

@casperdcl
Copy link
Sponsor Member

This has been reported before (originally at #433) - the real problem is upstream jupyterlab/jupyterlab#7354 (bot auto-closed, should be re-opened) and jupyter-widgets/ipywidgets#1845.

@casperdcl casperdcl added invalid ⛔ Not-an-issue or upstream (not-our-issue) p2-bug-warning ⚠ Visual output bad submodule-notebook 📓 Much web such IDE labels Mar 26, 2022
@casperdcl casperdcl self-assigned this Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid ⛔ Not-an-issue or upstream (not-our-issue) p2-bug-warning ⚠ Visual output bad submodule-notebook 📓 Much web such IDE
Projects
None yet
Development

No branches or pull requests

4 participants