question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Widgets not rendering after reloading vscode

See original GitHub issue

Environment data

  • VS Code Insiders: 1.56.0-insider 550035808407c15252e581e8abe1b820b9d311ee x64
  • Jupyter Extension version (available under the Extensions sidebar): 2021.6.718745073
  • Python Extension version (available under the Extensions sidebar): 2021.3.680753044
  • OS (Windows | Mac | Linux distro) and version: Windows10
  • Python and/or Anaconda version: 3.9.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Jupyter server running: Remote
  • IpyWidgets==7.6.3

Behavior

When I’m initializing the jupyter server, connecting the notebook for the first time and runing the following cell

from tqdm.notebook import tqdm
[k for k in tqdm(range(10))]

image

The ipywidget is displaying correctly. However, if I exit the notebook and comeback or if I reload the notebook, the Ipywidget does not render anymore. image

When I toggle the developper tools, on reload I have the following warning image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Apr 12, 2021

In general IPyWidgets will not be re-loaded whether we re-load or close/re-open a notebook, unless we have https://github.com/microsoft/vscode-jupyter/issues/4404 (which is what Rich has highlighted https://github.com/microsoft/vscode-jupyter/issues/5424#issuecomment-815065089)

0reactions
joyceerhlcommented, May 17, 2021

Validated (I think). In Insiders now if I execute a notebook with ipyvolume widgets, then reload, the widget doesn’t initially show, but I can reexecute the cell and see the widget appear in the cell output.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code does not render ipywidgets correctly
1 fixed all issues I was having. If you want to try it as well, you can run: pip install -U ipywidgets==7.7.1.
Read more >
Visual Studio Code June 2022
Learn what is new in the Visual Studio Code June 2022 Release (1.69)
Read more >
IntelliSense in Visual Studio Code
This can be caused by a variety of reasons. First, try restarting VS Code. If the problem persists, consult the language extension's documentation....
Read more >
VS Code API | Visual Studio Code Extension API
Describes the behavior of decorations when typing/editing at their edges. DecorationRenderOptions. Represents rendering styles for a text editor decoration.
Read more >
May 2022 (version 1.68) - Visual Studio Code
VS Code will render extensions as deprecated in the Extensions view, as shown below. A deprecated extension that is no longer being maintained....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found