meshplot icon indicating copy to clipboard operation
meshplot copied to clipboard

offline mode: save as html not working

Open lei-shu opened this issue 2 years ago • 5 comments

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': #<Promise> could not be cloned.
  • etc.

Thanks!

lei-shu avatar Mar 27 '23 16:03 lei-shu

same here...

ciaovention avatar Apr 04 '23 18:04 ciaovention

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.

VGTHuang avatar Apr 10 '23 06:04 VGTHuang

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.

scottcb avatar Sep 13 '23 00:09 scottcb

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 avatar Sep 13 '23 03:09 VGTHuang

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

VGTHuang avatar May 28 '24 08:05 VGTHuang