Unable initiate FSLeyes

Summary of what happened: FSLeyes: AttributeError: ‘NoneType’ object has no attribute ‘decode’

Command used (and if a helper script was used, a link to the helper script or the command generated):

fsleyes 

Version:

SLeyes version 1.14.2; Ubuntu 22.04.05;

Environment (Docker, Singularity / Apptainer, custom installation):

custom installation from shell, code: curl -Ls https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/getfsl.sh | sh -s, was uesd to install FSL 6.0.7.18. NVIDIA-SMI 570.169 , Driver Version: 570.169 , CUDA Version: 12.8 were installed.

Data formatted according to a validatable standard? Please provide the output of the validator:

None

Relevant log outputs (up to 20 lines):

Traceback (most recent call last):
  File "/home/crzazy/toolbox/fsl/lib/python3.12/site-packages/fsleyes/gl/__init__.py", line 793, in create
    ready()
  File "/home/crzazy/toolbox/fsl/lib/python3.12/site-packages/fsleyes/main.py", line 604, in realCallback
    fslgl.bootstrap(namespace.glversion)
  File "/home/crzazy/toolbox/fsl/lib/python3.12/site-packages/fsleyes/gl/__init__.py", line 457, in bootstrap
    glver = GL.glGetString(GL.GL_VERSION).decode('latin1').split()[0]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'decode'

Screenshots / relevant information:

None


Hi @zychen,

Do you have OpenGL installed?

Best,
Steven

1 Like

Dear Steven:
Thanks for your reply.

shell
glxinfo | grep “OpenGL version”
OpenGL version string: 4.6.0 NVIDIA 535.230.02

indeed, OpendGL was installed.

Zhiyuan

Hi @zychen, do other OpenGL applications, e.g. glxgears, work? You could also try connectome workbench and Freeview (the Freesurfer viewer) if you have them installed.

When did you install FSL? You can find this out by running fslversion -v. There was a short period during which the conda-forge OpenGL dependency stack was broken, although this should have been resolved in early June.

1 Like

Thank you! This problem occurred after installing SPSS 26 for Linux, and the Python for SPSS were auto installed. I speculated this disrupted the environments. So rm -rf / was executed on my Ubuntu, Ubuntu and all tools were reinstalled subsequently. Fortunately, this problem was successfully solved.