Qt.qpa.plugin issue

Hello:

I tried to use a semi-auto centerline detection using the dev version and run into issues with qt.qpa.plugin. Any idea to how to fix the issue? Please see below:

code:
sct_get_centerline -i dmri_dwi_mean.nii.gz -method viewer

output:


Spinal Cord Toolbox (dev)

qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

Thanks!
Qiuting

Hi Qiuting,

Could you please run sct_check_dependencies and copy/paste the output there? Are you using SCT via an ssh connection?

Please see below for the output. I was not using SCT via an ssh connection. I used it on a server through remote desktop.


Spinal Cord Toolbox (dev)

SCT info:

  • version: dev
  • path: /N/project/wulab/software/sct-dev-aug-29-2020
    OS: linux (Linux-3.10.0-1127.18.2.el7.x86_64-x86_64-with-redhat-7.8-Maipo)
    CPU cores: Available: 48, Used by SCT: 48
    RAM: MemTotal: 263434124 kB
    total used free shared buff/cache available
    Mem: 257259 30862 197262 14254 29135 211279
    Swap: 0 0 0
    Check Python executable…[OK]
    Using bundled python 3.6.10 |Anaconda, Inc.| (default, May 8 2020, 02:54:21)
    [GCC 7.3.0] at /N/project/wulab/software/sct-dev-aug-29-2020/python/envs/venv_sct/bin/python
    Check if data are installed…[OK]
    Check if colored is installed…[OK] (1.4.2)
    Check if dipy is installed…[OK] (1.1.1)
    Check if futures is installed…[OK]
    Check if h5py is installed…[OK] (2.10.0)
    Check if ivadomed (2.0.2) is installed…[OK] (2.0.2)
    Check if Keras (2.1.5) is installed…[OK] (2.1.5)
    Check if matplotlib is installed…[OK] (3.3.1)
    Check if nibabel is installed…[OK] (3.1.1)
    Check if numpy is installed…[OK] (1.19.1)
    Check if pandas is installed…[OK] (1.1.1)
    Check if psutil is installed…[OK] (5.7.2)
    Check if pyqt5 (5.11.3) is installed…[OK] (5.11.3)
    Check if pytest is installed…[OK] (6.0.1)
    Check if pytest-cov is installed…[OK] (version = ‘2.10.1’)
    Check if raven is installed…[OK]
    Check if requests is installed…[OK] (2.24.0)
    Check if requirements-parser is installed…[OK] (0.2.0)
    Check if scipy is installed…[OK] (1.5.2)
    Check if scikit-image is installed…[OK] (0.17.2)
    Check if scikit-learn is installed…[OK] (0.23.2)
    Check if tensorflow (1.5.0) is installed…[OK] (1.5.0)
    Check if torch (1.5.0+cpu) is installed…[OK] (1.5.0+cpu)
    Check if torchvision (0.6.0+cpu) is installed…[OK] (0.6.0+cpu)
    Check if xlwt is installed…[OK] (1.3.0)
    Check if tqdm is installed…[OK] (4.48.2)
    Check if transforms3d is installed…[OK] (0.3.1)
    Check if urllib3 is installed…[OK] (1.25.10)
    Check if spinalcordtoolbox is installed…[OK]
    Check ANTs compatibility with OS …[OK]
    Check PropSeg compatibility with OS …[OK]
    Check if DISPLAY variable is set…[OK]
    Check if figure can be opened with PyQt…qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

Thank you for the info. While we are looking into a solution, if you need the display, are you able to run SCT via a virtual machine?

Hi @xiaowen95,

I notice that you’re running redhat and that the error you encountered is a problem with libxcb

This forum post reports an identical error message, https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found/8

And was successfully resolved by reinstalling libxcb with sudo pacman -S libxcb

If you’re comfortable reinstalling the library, can you give that a shot. You can check if it worked either by running your original command or sct_check_dependencies, you shouldn’t get that "qt.qpa.plugin" message at the bottom.