Skip to content

Standard tqdm displays on multiple lines when jupyter_server_nbmodel is installed #39

@eleonorecharles

Description

@eleonorecharles

Description

When using the standard tqdm progress bar (not the notebook/IPyWidget version) in a Jupyter notebook with jupyter_server_nbmodel installed, the progress bar appears on multiple lines instead of properly overwriting a single line. This creates a cluttered output with each progress update appearing on a new line, making it difficult to read and significantly increasing cell output size.

Image

Reproduce

  1. Install the required packages:
pip install jupyter_server_nbmodel[lab] tqdm
  1. Start JupyterLab and create a new notebook
  2. Execute the following code in a cell:
from tqdm import tqdm  # Standard tqdm, not tqdm.notebook
import time

for i in tqdm(range(100)):
    time.sleep(0.1)  # Simulate long-running process
  1. Observe that instead of updating a single progress bar line, each update creates a new line, resulting in multiple lines of output

Expected behavior

The standard tqdm progress bar should display on a single line with updates replacing the previous state (using carriage returns), even when jupyter_server_nbmodel is installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions