JiveyGuy / Meteorite_Data_Mine

For NMSU CS 488
The Unlicense
2 stars 0 forks source link

Running notebook breaks when attempting to run remotely. #2

Closed RustyRaptor closed 1 year ago

RustyRaptor commented 1 year ago

It looks like you have to have an display on the machine running the code. I could not run this cell when running on a remote machine. This might not have a solution other than running locally.

[/home/ugrad10/zarafat/src/Metorite_Data_Mine/.venv/lib64/python3.11/site-packages/pyvista/plotting/plotter.py:149](https://vscode-remote+ssh-002dremote-002bbrooks-002ecs-002enmsu-002eedu.vscode-resource.vscode-cdn.net/home/ugrad10/zarafat/src/Metorite_Data_Mine/.venv/lib64/python3.11/site-packages/pyvista/plotting/plotter.py:149): 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
  ``pyvista.start_xvfb()``

  warnings.warn(
[/home/ugrad10/zarafat/src/Metorite_Data_Mine/.venv/lib64/python3.11/site-packages/pyvista/jupyter/notebook.py:33](https://vscode-remote+ssh-002dremote-002bbrooks-002ecs-002enmsu-002eedu.vscode-resource.vscode-cdn.net/home/ugrad10/zarafat/src/Metorite_Data_Mine/.venv/lib64/python3.11/site-packages/pyvista/jupyter/notebook.py:33): UserWarning: Failed to use notebook backend: 

No module named 'trame'

Falling back to a static output.
  warnings.warn(
ERROR:root:bad X server connection. DISPLAY=
2023-09-13 13:12:50.625 (  10.181s) [         AC27740]vtkXOpenGLRenderWindow.:464    ERR| vtkXOpenGLRenderWindow (0x563c1d92b0a0): bad X server connection. DISPLAY=
Cannot execute code, session has been disposed. Please try restarting the Kernel.
RustyRaptor commented 1 year ago

ooooh nevermind the error output literally tells us the solution.

Adding pyvista.start_xvfb() at the top of the cell allows it to render in the notebook itself. I will make a branch to fix this and then make a PR. We may need to test to make sure it still works locally though.

RustyRaptor commented 1 year ago

Yeah so running on a headless server is a nightmare. I gave up after 3 hours of digging.

JiveyGuy commented 1 year ago

So sorry for the nightwares! I mentioned in #4 that we should maybe only use movies (videos) what do you think?

JiveyGuy commented 1 year ago

Should we pull in the branch @RustyRaptor ?

RustyRaptor commented 1 year ago

No, this ended up not fixing the issue.

JiveyGuy commented 1 year ago

Sounds good