I run the code in ssh server and the server has Xserver but it give me the attachment error: Do anyone know how can I solve this error?

the steps I did to run the code using these commands:

  1. export QT_QPA_PLATFROM=offscreen
  2. export QT_DEBUG_PLUGINS=1

ERR| vtkXOpenGLRenderWindow (0x23e4770): bad X server connection. DISPLAY=
Aborted (core dumped)

As your previous post this one is also unrelated to PyTorch, so please post it in a Qt-specific discussion board.