skoch9 / meshplot

Plot 3D triangle meshes
GNU General Public License v3.0
148 stars 37 forks source link

Unable to use meshplot on VSCode and Python 3.9 #45

Open Sentient07 opened 1 year ago

Sentient07 commented 1 year ago

Hello,

As the title says, I'm unable to plot on a notebook using VSCode alongside Python 3.9. Specifically, I get the error(s) attached below.

image

When I click on the image, I get the following traceback (not sure if it is one though)

 at ph.loadClass (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.15/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4099813)
    at ph.loadClass (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.15/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4403287)
    at ph.loadModelClass (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.15/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4097773)
    at ph._make_model (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.15/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4094616)
    at ph.new_model (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.15/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4092246)
    at ph.handle_comm_open (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.15/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4091039)
    at https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.15/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4402511
    at g._handleCommOpen (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-2023.4.1011241018-linux-x64/out/webviews/webview-side/ipywidgetsKernel/ipywidgetsKernel.js:2:36493)
    at async g._handleMessage (https://file+.vscode-resource.vscode-cdn.net/home/ramana/.vscode/extensions/ms-toolsai.jupyter-2023.4.1011241018-linux-x64/out/webviews/webview-side/ipywidgetsKernel/ipywidgetsKernel.js:2:38387)

The closest to mine is https://github.com/skoch9/meshplot/issues/38. I tried out all suggestions from the comments, but no avail.

Sentient07 commented 1 year ago

From notebook on Chrome, I see the following 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
TypeError: Cannot read properties of undefined (reading 'then')
    at http://localhost:8888/lab/extensions/jupyter-threejs/static/jupyter-threejs-chunk.ba1735fea70611ab4bc1.js?v=ba1735fea70611ab4bc1:1:32057
    at async Promise.all (index 20)

I tried pip install --upgrade jupyterlab && pip install --upgrade ipywidgets && pip install --upgrade pythreejs, jupyter nbextension enable --py pythreejs , jupyter nbextension enable --py widgetsnbextension yet no avail.

VGTHuang commented 1 year ago

a possible workaround #44 (comment)