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

offline mode: save as html not working #44

Open
lei-shu opened this issue Mar 27, 2023 · 5 comments
Open

offline mode: save as html not working #44

lei-shu opened this issue Mar 27, 2023 · 5 comments

Comments

@lei-shu
Copy link

lei-shu commented Mar 27, 2023

Hi,

I tried on several machines (Linux & MacOS) with several different versions of the packages (jupyter/pythreejs/etc), in offline mode, the "save as html" function seems not working at this moment (the html saved is fully white). What could be the problem?

Some error messages in the generated .html:

  • Failed to load resource: net::ERR_FILE_NOT_FOUND, jupyter-threejs.js:1
  • Error serializing widget state attribute: camera
  • embed-amd.js:16 DOMException: Failed to execute 'structuredClone' on 'Window': # could not be cloned.
  • etc.

Thanks!

@ciaovention
Copy link

same here...

@VGTHuang
Copy link

Same here. Do you think it's due to updates of jupyter-widgets? I was using meshplot just fine till around two weeks ago and thats when the update happened.

@scottcb
Copy link

scottcb commented Sep 13, 2023

I am having the same issue (blank output when using the "offline" function). In addition, meshplot is not working within a jupyter notebook, either.

When I call

mp.plot(v, c=np.random.random((v.shape[0],3)))

I get a broken plot and the following Javascript error:

"[Open Browser Console for more detailed log - Double click to close this message]
Model class 'RendererModel' from module 'jupyter-threejs' is loaded but can not be instantiated
1233/e/<@http://localhost:8888/lab/extensions/jupyter-threejs/static/jupyter-threejs-chunk.ba1735fea70611ab4bc1.js?v=ba1735fea70611ab4bc1:1:32036"

This is in a fresh conda install, and a brand new conda environment where all I did was:
conda install numpy scipy jupyterlab ipywidgets meshplot -c conda-forge

So I think something has changed upstream that has broken this repo.

@VGTHuang
Copy link

VGTHuang commented Sep 13, 2023

I am having the same issue (blank output when using the "offline" function). In addition, meshplot is not working within a jupyter notebook, either.

When I call

mp.plot(v, c=np.random.random((v.shape[0],3)))

I get a broken plot and the following Javascript error:

"[Open Browser Console for more detailed log - Double click to close this message]
Model class 'RendererModel' from module 'jupyter-threejs' is loaded but can not be instantiated
1233/e/<@http://localhost:8888/lab/extensions/jupyter-threejs/static/jupyter-threejs-chunk.ba1735fea70611ab4bc1.js?v=ba1735fea70611ab4bc1:1:32036"

This is in a fresh conda install, and a brand new conda environment where all I did was: conda install numpy scipy jupyterlab ipywidgets meshplot -c conda-forge

So I think something has changed upstream that has broken this repo.

I have created a temporary workaround to display (some of) scenes:

https://github.com/VGTHuang/meshplot_tempfix/blob/master/meshplot/Viewer.py

I replaced p3s.DirectionalLight with p3s.RectAreaLight which seems to have fixed the display error. It renders the scene sans the specular lighting. However I'm unable to fix the behaviour in jupyter mode:

image

while in offline mode it displays normally:

image

@VGTHuang
Copy link

The new version of ipywidgets seems to have solved the problem. 8.1.2 works for me

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

4 participants