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.

[BUG] - matplotlib widget doesn't work in notebook - model not found

See original GitHub issue

OS system and architecture in which you are running Nebari

GCP K8s cluster

Expected behavior

%matplotlib widget
import matplotlib.pyplot as plt

plt.plot([1,2,3], [1,2,3])
plt.show()

the above should show a plot.

Actual behavior

get an error:

Error displaying widget: model not found
Screen Shot 2022-11-11 at 6 29 46 PM

How to Reproduce the problem?

  1. add ipympl package to the default dashboard conda environment

  2. run the following in a notebook using the default dashboard conda environment:

    %matplotlib widget
    import matplotlib.pyplot as plt
    
    plt.plot([1,2,3], [1,2,3])
    plt.show()
    

Command output

%matplotlib widget
import matplotlib.pyplot as plt

plt.plot([1,2,3], [1,2,3])
plt.show()


### Versions and dependencies used.

- needed to install `ipympl` first in the `dashboard` conda environment

### Compute environment

GCP

### Integrations

conda-store

### Anything else?

_No response_

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
iameskildcommented, Nov 21, 2022

I added ipympl to the base nebari-jupyterlab image and successfully test it locally. This also didn’t require pinning the jupyterlab version 💪

Here is a PR for to get this working: https://github.com/nebari-dev/nebari-docker-images/pull/39

1reaction
iameskildcommented, Nov 15, 2022

@dharhas I was in agreement 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Error displaying widget: model not found” with Jupyter lab #112
I followed your installation instructions on a fresh python and jupyter setup with pip but end up with “Error displaying widget: model not...
Read more >
Jupyter-matplotlib: Error displaying widget: model not found
Solved! Turned out ipywidget 7.5 breaks jupyter lab and it isaffecting other libraries too. https://github.com/plotly/plotly.py/issues/1659.
Read more >
Error displaying widget: model not found -- how to fix this?
It's a bit hard to tell, but there may be more information in the browser console (usually shown by pressing F12 ).
Read more >
Error displaying widget; model not found: 5 Fixes
In this article, we're talking about the “Error displaying widget: model not found” problem when using Jupyter Labs in Python.
Read more >
Issue with stackview inside JupyterLab - "Error displaying widget
Hi, i just wanted to test the really cool stackview package inside a juypter notebook but encountered a problem which I could solve...
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