Pyvista Error Waveguide Example


I encountered this error while trying to run it from the tutorials: Electromagnetic modal analysis for a waveguide — DOLFINx 0.7.2 documentation

WARNING:py.warnings:/usr/local/lib/python3.10/dist-packages/pyvista/plotting/ UserWarning:
This system does not appear to be running an xserver.
PyVista will likely segfault when rendering.

Try starting a virtual frame buffer with xvfb, or using


WARNING:py.warnings:/usr/local/lib/python3.10/dist-packages/pyvista/jupyter/ UserWarning: Failed to use notebook backend:

No module named ‘trame’

Falling back to a static output.

ERROR:root:bad X server connection. DISPLAY=

I have seen the questions asked before about this error, but do you have any advice on how to solve the problem in an easier way or plot in another way without performing the recommended steps regarding Pyvista, without installing Pyvista?

Also, if anyone has information about installing Pyvista on Windows, I would appreciate it.


This is surely a issue with pyvista, rather than dolfinx, and support must be asked to pyvista developers, rather than us.

Please proceed as follows:

  1. try to see if you can replicate the error with a simpler tutorial, for instance Test out PyVista’s Jupyter Backend — PyVista Tutorial or Examples — PyVista 0.43.1 documentation
  2. once that is confirmed, ask for support at pyvista/pyvista · Discussions · GitHub
  3. post a reply with the link to your question on the pyvista forum, in case other users may find it useful in future.

After you post the reply with the link, I’ll be locking this topic. In the meantime, I ask other users NOT to reply with a solution: instead, do so on the pyvista forum as soon as the link is posted.

I am not doing this to be rude or unhelpful: I am doing this because the community needs to be educated on what is the right channel to ask for help. If you had a problem with your foot, you wouldn’t go and ask an appointment to a heart surgeon, wouldn’t you? The same rationale should be applied here: the problem is clearly with pyvista, and thus the pyvista community is the best position to help.