JN 7 → tqdm_notebook(leave=False) → Error displaying widget: model not found
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
Hi,
This message appears only in JN 7 (not in JN<7) and obviously comes from the fact that tqdm widget is discarded by param "leave=False".
The Jupyter Notebook 7 together with the very last versions of packages (all installed on 27.7.2023) and so far everything works smoothly, however, a minor bug is when using tqdm_notebook(leave=False) inside another widget then in JN is reported "Error displaying widget: model not found".
The code logic is as follows:
```
from ipywidgets import interactive
from tqdm.notebook import tqdm_notebook
def x():
for i in tqdm_notebook(['a'], leave=False):
1
interactive(x)
```

I have reported the issue to tqdm team too.
Best,
Michal
Contributor guide
Research direction
Reproduce the example with Jupyter Notebook 7, ipywidgets interactive, and tqdm.notebook.tqdm_notebook(leave=False). Start by tracing widget disposal and model lookup during the interactive output lifecycle. Done means the example no longer reports “Error displaying widget: model not found” when the progress widget is discarded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100