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

404 error and no such comm target when trying to use ipywidgets #1720

Closed
npyoung opened this issue Sep 19, 2017 · 11 comments
Closed

404 error and no such comm target when trying to use ipywidgets #1720

npyoung opened this issue Sep 19, 2017 · 11 comments
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@npyoung
Copy link

npyoung commented Sep 19, 2017

I installed ipywidgets 7.0.1 via conda into a conda root python3 environment. When starting a notebook, I get a 404 when trying to load the extension

404 GET /nbextensions/widgetsnbextension.js?v=20170918194201 (171.66.17.71) 3.38ms referer=<my nb server's host IP>/notebooks/<my notebook>.ipynb

Followed by an error from IPkernelApp when I try to create and show a widget

[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version

I shouldn't have to manually enable the extension since I'm using conda, but I tried doing jupyter nbextension enable --py widgetsnbextension anyway, which did not solve this.

@jasongrout
Copy link
Member

[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version

This indicates that your javascript is from widgetsnbextension 2. What version of widgetsnbextension and ipywidgets do you have listed in conda list?

Do you have the same error when trying from the browser's incognito mode?

@tensionhead
Copy link

When starting a notebook, I get a 404 when trying to load the extension

I had exactly the same (and other) problem(s), however activating it didn't help ("could not Validate"). This line solved it for me:

jupyter nbextension install --py widgetsnbextension --user

(I guess for your setup you should leave out the --user flag)

And then I did the activation step

jupyter nbextension enable --py widgetsnbextension

@npyoung
Copy link
Author

npyoung commented Sep 19, 2017

Results from conda list

widgetsnbextension        3.0.3                      py_1    conda-forge
widgetsnbextension        3.0.3                     <pip>
ipywidgets                7.0.1                      py_2    conda-forge

So it looks like I have version 3 of widgetsnbextension. Force-refresh and incognito give me the same errors as before.

jupyter nbextension install --py widgetsnbextension --user and jupyter nbextension enable --py widgetsnbextension also don't fix this. nbextension installgives me - Validating: OK

@mikeskaug
Copy link

Having the same issue today.

Strangely, it worked a few times, but after making various changes to my conda environment, reinstalling packages and restarting the notebook, it stopped rendering the widget and I noticed a similar 404 error to the one mentioned above:

404 GET /nbextensions/widgets/notebook/js/extension.js?v=20170919161620 (::1) 1.64ms referer=http://localhost:8888/notebooks/Untitled.ipynb

Here is what I have installed:

$ conda list
....
ipywidgets                7.0.1                      py_2    conda-forge
....
widgetsnbextension        3.0.3                      py_1    conda-forge

@mikeskaug
Copy link

Using @tensionhead suggestion above solved it for me.

@jasongrout
Copy link
Member

Thanks for the report. We switched the conda-forge package to a noarch package in conda-forge/ipywidgets-feedstock#27 - I wonder if that somehow had an effect on the files that are usually copied?

I can check in a few days.

@jasongrout
Copy link
Member

This is likely the same issue as #1721, and would be an issue with the conda-forge widgetsnbextension package (see conda-forge/widgetsnbextension-feedstock#29 for the PR migrating that to a noarch package).

@npyoung
Copy link
Author

npyoung commented Sep 20, 2017

I tried installing the 3.0.2 version of widgetsnbextension as @beenje's suggests in #1721 to no avail. Now I don't get the [IPKernelApp] ERROR, but I still get the 404s and nothing renders. @tensionhead's solution didn't help either (I had to keep the --user flag or it would try to install the extension on my system python).

I also get a warning in my js console after the 404s telling me I need to install ipywidgets 4.0. Seems like a stale warning since the corresponding ipywidgets version is 7.0.

EDIT: I had a look at jupyter nbextension list and it was a mess: configs in 3 different places, some of which didn't validate. Once I got that cleaned up I was able to get the jupyter-js-widgets to load. I'll note, however, that conda's ipywidgets installer still is not enabling the extension by default.

@jasongrout
Copy link
Member

It seems that #1721 is the same issue - let's move the discussion there so we have one place for trouble-shooting this issue.

@irodionzaytsev
Copy link

Typical opensource problemsolving - a dozen of useless comments, no working solution. At least you didn't ignore the issue altogether though.

@jasongrout
Copy link
Member

WIthin a day or two, we had identified and fixed the issue three years ago, as documented above and on #1721. Coming along and posting a snarky complaint three years later does not help move things forward for this issue or the community. We invite you to be uplifting and contribute to the solution, being respectful like everyone else on this issue, in the spirit of the code of conduct: https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md#expected-behavior

@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

5 participants