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 GET Errors When Trying to Run ipyvolume on Jupyter Notebook #421

Open
ternarysrche opened this issue Jan 2, 2023 · 6 comments
Open

Comments

@ternarysrche
Copy link

I'm trying to get the following code to work in Jupyter Notebook:

import ipyvolume as ipv
import numpy as np
N = 1000
x, y, z = np.random.normal(0, 1, (3, N))
fig = ipv.figure()
scatter = ipv.scatter(x, y, z)
ipv.show()

Yet when I run the code, no output is displayed, and the kernel freezes, unable to be shutdown and to run other codes, until I reload the page. Terminal displays the following warnings and nothing else:

[W 00:22:00.355 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20230102002145 (::1) 22.960000ms referer=http://localhost:8888/notebooks/Documents/sttp/Untitled.ipynb
[W 00:22:07.512 NotebookApp] 404 GET /static/jupyter-threejs.js?v=20230102002145 (::1) 2.790000ms referer=http://localhost:8888/notebooks/Documents/sttp/Untitled.ipynb
[W 00:22:07.969 NotebookApp] 404 GET /static/three.js?v=20230102002145 (::1) 2.710000ms referer=http://localhost:8888/notebooks/Documents/sttp/Untitled.ipynb

Other widgets from ipywidget work just fine, and I have ensured that all required extensions are enabled. How do I fix this problem? Thanks in advance.

@ternarysrche ternarysrche changed the title 404 GET Errors when Trying to Run ipyvolume on Jupyter Notebook 404 GET Errors When Trying to Run ipyvolume on Jupyter Notebook Jan 2, 2023
@maartenbreddels
Copy link
Collaborator

maartenbreddels commented Jan 2, 2023 via email

@ternarysrche
Copy link
Author

Thanks for the quick response! I have installed pythreejs, and after running jupyter nbextension list, it shows the following:

Known nbextensions:
  config dir: /Users/christopher/.jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
  config dir: /Users/christopher/opt/anaconda3/etc/jupyter/nbconfig
    notebook section
      bqplot/extension  enabled 
      - Validating: OK
      jupyter-datawidgets/extension  enabled 
      - Validating: OK
      jupyter-threejs/extension  enabled 
      - Validating: OK
      nbextensions_configurator/config_menu/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/config_menu/main
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
    tree section
      nbextensions_configurator/tree_tab/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/tree_tab/main

However, pythreejs does not seem to work either. After I run the Geometry Examples on pythreejs's documentation page, it also displays nothing
Screenshot 2023-01-02 at 11 43 20 AM
The terminal again outputs:

[W 11:45:44.969 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20230102112604 (::1) 5.940000ms referer=http://localhost:8888/notebooks/Documents/sttp/Untitled1.ipynb
[W 11:45:45.278 NotebookApp] 404 GET /static/jupyter-threejs.js?v=20230102112604 (::1) 2.220000ms referer=http://localhost:8888/notebooks/Documents/sttp/Untitled1.ipynb

I have tried searching for a solution to this issue, but to no avail.

@ternarysrche
Copy link
Author

A quick update, I installed node using Homebrew, and updated all relevant libraries using pip. Now, I get
Screenshot 2023-01-02 at 1 46 44 PM
With the error being:

[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'PreviewModel' from module 'jupyter-threejs'
Error: Script error for "jupyter-threejs"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (http://localhost:8888/static/components/requirejs/require.js?v=d37b48bb2137faa0ab98157e240c084dd5b1b5e74911723aa1d1f04c928c2a03dedf922d049e4815f7e5a369faa2e6b6a1000aae958b7953b5cc60411154f593:168:17)
    at HTMLScriptElement.onScriptError (http://localhost:8888/static/components/requirejs/require.js?v=d37b48bb2137faa0ab98157e240c084dd5b1b5e74911723aa1d1f04c928c2a03dedf922d049e4815f7e5a369faa2e6b6a1000aae958b7953b5cc60411154f593:1735:36)

The console error message is
Screenshot 2023-01-02 at 1 49 28 PM

@lmx492274842
Copy link

same error , No picture to show

@lmx492274842
Copy link

same error , No picture to show

image

@maartenbreddels
Copy link
Collaborator

With pythreejs 2.4.1 it seems to work now.

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