ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

JN 7 → tqdm_notebook(leave=False) → Error displaying widget: model not found

Open MichalRIcar opened this issue 2 years ago • 2 comments

Hi,

the issue was wrongly closed, thus reopening.

Using tqdm 4.65.0 and message " Error displaying widget: model not found" appears in Jupyter Notebook 7 (not in JN<7) and JupterLab 4.03 when tqdm is inside another widget. Obviously, it comes from the fact that tqdm widget is discarded by param "leave=False".

The bug: tqdm_notebook(leave=False) inside another widget → JN 7 / JL 4 reports "Error displaying widget: model not found".

Reproduction of the bug:

from   ipywidgets         import interactive
from   tqdm.notebook      import tqdm_notebook

def x():
    for i in tqdm_notebook(['a'], leave=False):
        1

interactive(x)

image

I have reported the issue to tqdm and JN teams too.

image

Best, Michal

MichalRIcar avatar Aug 03 '23 18:08 MichalRIcar

Connected with the open issue https://github.com/jupyter/notebook/issues/6989 and https://github.com/tqdm/tqdm/issues/1487 And wrongly closed one https://github.com/jupyter-widgets/ipywidgets/issues/3812

MichalRIcar avatar Aug 03 '23 18:08 MichalRIcar

I'm running into the same problem even just running something easy like

from tqdm.notebook import tqdm

for i in tqdm(range(100)):
    pass

using JupyterLab with

notebook                     7.0.4
jupyterlab                   4.0.6 
tqdm                         4.66.1

and I have @jupyter-notebook/lab-extension v7.0.4 and @jupyter-widgets/jupyterlab-manager v5.0.9

Any updates on this issue?

ClaudiaSchulz avatar Sep 27 '23 16:09 ClaudiaSchulz