404 GET Errors When Trying to Run ipyvolume on Jupyter Notebook
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.
Ipyvolume requires pythreejs, can you check if that works?
On Mon, 2 Jan 2023 at 09:34, Christopher Chen @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/widgetti/ipyvolume/issues/421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANPEPKYX43J6DVCBOGWDQTWQKHH5ANCNFSM6AAAAAATOT252M . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Maarten Breddels Software engineer / consultant / data scientist Python / C++ / Javascript / Jupyter www.maartenbreddels.com / vaex.io @.*** +31 6 2464 0838 <+31+6+24640838> [image: Twitter] https://twitter.com/maartenbreddels[image: Github] https://github.com/maartenbreddels[image: LinkedIn] https://linkedin.com/in/maartenbreddels[image: Skype]
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
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.
A quick update, I installed node using Homebrew, and updated all relevant libraries using pip. Now, I get
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

same error , No picture to show
same error , No picture to show
With pythreejs 2.4.1 it seems to work now.