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.

ipywidgets 6 + jupyter-js-widgets 7 incompatibility

See original GitHub issue

I ran into an issue when installing ipywidgets to a fresh conda environment and jupyter notebook loading jupyter-js-widgets/extension from /usr/local/share/jupyter vs. /Users/grant/anaconda/envs/mycondaenv/share/jupyter. ipywidgets in the conda environment was 6.0.0 and jupyter-js-widgets/extension was linked to my dev install of ipywidgets (7.0.0).

The issue looked like:

image

image

The root of the issue is a breaking change introduced by https://github.com/jupyter-widgets/ipywidgets/pull/1194, specifically https://github.com/jupyter-widgets/ipywidgets/commit/9d896f76d01b23b3b9fb60a2948141f77da769ef#diff-30b37447269c75d7eff843470858ea28, which looks for widget state in msg.content.data.state vs msg.content.data.

  1. I remember in previous versions, ipywidgets would return an error message if there as a version mismatch between JS and Python? That would’ve made this issue much easier to debug.
  2. Given that this breaks backwards-compatibility, is there a legitimate need to move widget state from msg.content.data to msg.content.data.state? This shouldn’t affect anyone unless they version mismatch between JS and Python, so if we solve #1 then we solve this.
  3. Is this the way that jupyter paths are supposed to work? I assumed that an nbextension installed to a conda environment would take precedence over an nbextension installed elesewhere?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jasongroutcommented, Jun 30, 2017

I’m working on this by implementing a version check for the manager protocol version when a comm is opened. The protocol version will be sent in the metadata of the comm open message.

0reactions
jasongroutcommented, Jul 1, 2017

Fixed in #1470 by giving a much clearer message early on that there is a version incompatibility.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ipywidgets changelog — Jupyter Widgets 7.6.3 documentation
Major user-visible changes in ipywidgets 7.0 include: ... ipywidgets 6.0 breaks backward compatibility with respect to the handling of default values of the ......
Read more >
Migrating custom widget libraries — Jupyter Widgets 8.0.2 ...
Migrating from 7.x to 8.0 . In this section, we discuss migrating a custom widget from ipywidgets 7 to ipywidgets 8 or...
Read more >
ipywidgets Documentation
The jupyter-js-widgets Javascript implementation now relies on the PhosphorJS framework for the management of rich layout and a better ...
Read more >
Installation — Jupyter Widgets 7.6.5 documentation
Install the widgetsnbextension package in the environment containing the Jupyter Notebook server. Install ipywidgets in each kernel's environment that will use ...
Read more >
Developer Release Procedure — Jupyter Widgets 7.6.5 ...
For example, the commit https://github.com/jupyter-widgets/ipywidgets/commit ... in 7.0.0 not in any 6.x release git log --pretty=oneline --no-merges ^6.0.0 ...
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