Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Script error for "@jupyter-widgets/base" #76

Closed
MariuszJurowicz opened this issue Oct 13, 2017 · 5 comments
Closed

Uncaught Error: Script error for "@jupyter-widgets/base" #76

MariuszJurowicz opened this issue Oct 13, 2017 · 5 comments

Comments

@MariuszJurowicz
Copy link

The embedded version of ipyleaflet is broken. It does not work in nbviewer and in the http://jupyter.org/widgets.html
It throws the: Uncaught Error: Script error for "@jupyter-widgets/base", needed by: https://unpkg.com/jupyter-leaflet@*/dist/index.js.

the problem is the module_name that is resolved to @jupyter-widgets/base instead of the jupyter-js-widgets as the ipywidgets are available under the jupyter-js-widgets name by requirejs on nbviewer and http://jupyter.org/widgets.html

@scottdraves
Copy link

maybe not jason says:

I think the issue is that page tries to use the most recent version of ipyleaflet (the * in the request indicates it's trying to get the most recent version), but the data has not been updated and is only compatible with a previous version

@jasongrout
Copy link
Member

The switch from jupyter-js-widgets to @jupyter-widgets/base happened in ipywidgets 7. nbviewer needs to be upgraded to handle ipywidgets 7 - it's hardcoded at ipywidgets 6. We're tracking that at jupyter/nbviewer#717

For the jupyter.org webpage, it's also hardcoded at ipywidgets 6: https://github.com/jupyter/jupyter.github.io/blob/fae454d82f28cf98ce0d1cc4cd1eec59a4a3fe45/widgets.html#L8. However, the code tries to load the ipywidgets 7 version of ipyleaflet. The quick fix is to only load the ipywidgets 6 version of ipyleaflet. The more permanent fix is to upgrade the website code to use ipywidgets 7.

@jasongrout
Copy link
Member

The quick fix is to only load the ipywidgets 6 version of ipyleaflet.

On second thought, it may not be that easy - I think loading the latest version is hardcoded in that embedding javascript. It's probably best to switch it to use ipywidgets 7, using instructions at http://ipywidgets.readthedocs.io/en/stable/migration_guides.html#updating-embedded-widgets and updating the json data file with a version from the latest ipywidgets release.

@jasongrout
Copy link
Member

jasongrout commented Oct 16, 2017

Regardless, though, this is an issue with the Jupyter web page, not ipyleaflet, so I'll open an issue there.

@jasongrout
Copy link
Member

I opened jupyter/jupyter.github.io#240 to track the update to the webpage. With those two issues tracking these things, I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants