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.

Plotly installed on jupyterhub notebook produces console errors when using FigureWidget

See original GitHub issue

Hi,

I’ve been trying to get the new FigureWidget to work in a notebook hosted through a JupyterHub instance. I have the following packages installed:

ipywidgets==7.4.2
notebook==5.7.2
plotly==3.4.2`

The regular plotly offline mode works perfectly, however I need some more interaction with the plot, which is why I would like to use the FigureWidget. When creating a FigureWidget in the notebook, I get the following issues in the console: screenshot_jupyter_plotly

As you can see, the jupyterhub creates a user specific environment, maybe the static files aren’t installed properly?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jonmmeasecommented, Jan 18, 2019

Hi @shyam334,

I don’t have any specific ideas of what might be causing this, but here’s what I would try.

  1. Rename (or remove if you don’t care about anything in it) /usr/local/etc/jupyter/nbconfig/notebook.json so that jupyter doesn’t find any extensions outside of your conda environment.
  2. Uninstall, reinstall, and reenable the ipywidgets and plotlywidget extensions
$ jupyter nbextension uninstall --py --sys-prefix widgetsnbextension
$ jupyter nbextension uninstall --py --sys-prefix plotlywidget
$ jupyter nbextension install --py --sys-prefix widgetsnbextension
$ jupyter nbextension install --py --sys-prefix plotlywidget
$ jupyter nbextension enable --py --sys-prefix widgetsnbextension
$ jupyter nbextension enable --py --sys-prefix plotlywidget
  1. Try again 🙂
1reaction
misolietaveccommented, Dec 15, 2018

I have exactly the same versions of ipywidgets, notebook, plotly and got the same error messages 😃 ipywidgets alone work OK. After removing user configuration file (~/.jupyter/nbconfig/notebook.json) FigureWidget works (the nbextensions are specified in system-wide file /usr/local/etc/jupyter/nbconfig/notebook.json). I have packages installed by pip, not conda. This behaviour I tested with local jupyter notebook command and also with remote jupyterhub instance. Do not know, why this “works for me”, but maybe this can help developers in tracking problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly 3.0.0 FiguerWidget not working - Plotly Community Forum
I use python 3.6.2 and have no issues. Prior to executing the cell which causes the error (or isn't displaying), open your javascript...
Read more >
Error Displaying FigureWidget - Plotly Python
I am getting the error on both Jupyter Lab and Jupyter Notebook. On the browser dev console: Error displaying widget. Module plotlywidget, ...
Read more >
Plotly figurewidget overview in Python
New to Plotly? Plotly is a free and open-source graphing library for Python. We recommend you read our Getting Started guide for the...
Read more >
No model for FigureWidget - Plotly Python
jupyter labextension install jupyterlab-plotly@4.14.3 1891ms Fri Feb 19 07:08:34 ... generates Error displaying widget: model not found .
Read more >
Error creating widget: could not find model - Plotly Python
gives. Error creating widget: could not find model. I'm on Window, with anaconda (and plotly 3.0.0@rc11 installed from pip). notebook=5.5.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