Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xserver #12

Closed
Jianningli opened this issue Apr 12, 2023 · 2 comments
Closed

xserver #12

Jianningli opened this issue Apr 12, 2023 · 2 comments

Comments

@Jianningli
Copy link

Jianningli commented Apr 12, 2023

Hi,
great project. However, i encounter some issues recently using stpyvista.

Locally, it runs well. But when deployed to a server, the 3D model fails to display on the browser on the user end, with the following error:

'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

pyvista.start_xvfb()
warnings.warn(

It is strange that some time ago (before update?), the 3D viewer works fine

@edsaac
Copy link
Owner

edsaac commented Apr 12, 2023

I'd assume you are deploying on a headless environment, so you can add this line to the beginning of your python script to create a "virtual framebuffer"

pyvista.start_xvfb()

Also, you will need to have installed xvfb and libgl1-mesa-glx. On Debian:

apt install libgl1-mesa-dev xvfb

Check:

@Jianningli
Copy link
Author

Hi,

Thanks for the fast reply.

It works after adding pyvista.start_xvfb() and the libgl1-mesa-dev & xvfb packages.

@edsaac edsaac closed this as completed Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants