# Plot error using pyvista

**URL:** <https://fenicsproject.discourse.group/t/plot-error-using-pyvista/7616>\
**Category:** I/O\
**Created:** [February 5, 2022, 12:53pm UTC](https://fenicsproject.discourse.group/t/plot-error-using-pyvista/7616 "2022-02-05T12:53:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![x3037](https://avatars.discourse-cdn.com/v4/letter/x/eada6e/32.png) [@x3037](https://fenicsproject.discourse.group/u/x3037)\
**Post date:** [February 5, 2022, 12:53pm UTC](https://fenicsproject.discourse.group/t/plot-error-using-pyvista/7616/1 "2022-02-05T12:53:49Z")

</div>

Hello everyone, I’m a newer for dolfinx. I have installed dolfinx/lab using docker. I’m trying to follow the tutorial about Solving the Poisson equation, it raises the error when plot the function and mesh using pyvista:

Error displaying widget: model not found

The code is exactly the same with the tutorial. The official document of pyvista [Jupyter Notebook Plotting — PyVista 0.33.0 documentation](https://docs.pyvista.org/user-guide/jupyter/index.html) said that using `itkwidgets` and `ipyvtklink` will trigger this error. However, the error still exists when using `ipygany` and `pythreejs`. I really don’t know how to fix it. Has anyone encountered this problem?

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [February 6, 2022, 10:04pm UTC](https://fenicsproject.discourse.group/t/plot-error-using-pyvista/7616/2 "2022-02-06T22:04:46Z")

</div>

You need to add the following to the notebook:

```python
!pip3 install pyvista pythreejs ipygany --upgrade
!jupyter nbextension enable --py --sys-prefix ipygany

```

Then execute the code in the notebook. You will still encounter the error after calling these comamands.

However, if you now close your browser, reopen the jupyter-lab notebook it should all work.

---

<div class="post-metadata">

**Author:** ![x3037](https://avatars.discourse-cdn.com/v4/letter/x/eada6e/32.png) [@x3037](https://fenicsproject.discourse.group/u/x3037)\
**Post date:** [February 7, 2022, 2:10am UTC](https://fenicsproject.discourse.group/t/plot-error-using-pyvista/7616/3 "2022-02-07T02:10:30Z")

</div>

Dr dokken,

It works! Thanks a lot.

---

<div class="post-metadata">

**Author:** ![dmerthe](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dmerthe/32/3510_2.png) [@dmerthe](https://fenicsproject.discourse.group/u/dmerthe)\
**Post date:** [March 4, 2022, 10:28pm UTC](https://fenicsproject.discourse.group/t/plot-error-using-pyvista/7616/4 "2022-03-04T22:28:03Z")

</div>

If you need this to make the tutorial work, then it seems like this should be mentioned in the tutorial.

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [March 4, 2022, 11:20pm UTC](https://fenicsproject.discourse.group/t/plot-error-using-pyvista/7616/5 "2022-03-04T23:20:40Z")

</div>

The tutorial is open source, and anybody can contribute with content to it at: [GitHub - jorgensd/dolfinx-tutorial: A reimplementation of the Springer book: https://github.com/hplgit/fenics-tutorial/, covering new topics as well as transitioning from dolfin to dolfinx](https://github.com/jorgensd/dolfinx-tutorial)

If i find time for it over the weekend i will add a note to the section:  
[https://jorgensd.github.io/dolfinx-tutorial/fem.html#obtaining-the-software](https://jorgensd.github.io/dolfinx-tutorial/fem.html#obtaining-the-software)

Please note that this is not required if you intend on using the interactive jupyter-notebooks as described in:  
[https://jorgensd.github.io/dolfinx-tutorial/fem.html#interactive-tutorials](https://jorgensd.github.io/dolfinx-tutorial/fem.html#interactive-tutorials)
