ec-jrc / pyPoseidon

Framework for Hydrodynamic simulations
https://pyposeidon.readthedocs.io/
European Union Public License 1.2
20 stars 8 forks source link

mlab.mesh error: 'Error displaying widget: model not found' #116

Closed TPCollings closed 2 years ago

TPCollings commented 2 years ago

Hello again,

When running through the tutorial scripts I keep getting the error above when trying to view 3D meshes using the mplot function. Example of code and error below.

Google suggested its a problem with the jupyter lab extension but having exhausted all the potential solutions I'm at a loss. Pyposeidon has been installed with conda and so has all the dependencies.

Any suggestions of what to try next?

Cheers,

Tom

mesh.Dataset.mplot.mesh(dim='3D') Error displaying widget: model not found

brey commented 2 years ago

Hi. First make sure you are running jlab2 (itkwidgets doesn't work yet with jlab3).

Then try:

jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib jupyterlab-datawidgets itkwidgets ipyevents
TPCollings commented 2 years ago

Thanks George.

That's working great now. Last question - the global mesh doesn't appear to be showing when plotting with mplot? I've attached a figure to show what it is plotting. The line of code is posted below.

Thanks,

Tom

r.mplot.mesh(x=xn,y=yn,tes=tri3n,dim='3D')

Screenshot 2022-08-09 144304
brey commented 2 years ago

Hover over to the upper left corner where a menu appears. Click the icon with the mesh.

TPCollings commented 2 years ago

Perfect, thanks George.