New_release_5.2.0_error_sct_deepseg

Hi SCT Team,

I downloaded the latest release of SCT. I got the following error ;
s4333238@cai-wks3:/90days/s4333238/4322/top$ sct_deepseg -install-task seg_mice_gm-wm_dwi


Spinal Cord Toolbox (5.2.0)

sct_deepseg -install-task seg_mice_gm-wm_dwi

INSTALLING MODEL: model_seg_mice_gm-wm_dwi_unet2d-multichannel-softseg
Traceback (most recent call last):
File “/opt/spinalcordtoolbox-5.2.0/spinalcordtoolbox/scripts/sct_deepseg.py”, line 245, in
main(sys.argv[1:])
File “/opt/spinalcordtoolbox-5.2.0/spinalcordtoolbox/scripts/sct_deepseg.py”, line 148, in main
deepseg.models.install_model(name_model)
File “/opt/spinalcordtoolbox-5.2.0/spinalcordtoolbox/deepseg/models.py”, line 139, in install_model
sct.download.install_data(MODELS[name_model][‘url’], folder(name_model))
File “/opt/spinalcordtoolbox-5.2.0/spinalcordtoolbox/download.py”, line 143, in install_data
os.makedirs(dest_folder, exist_ok=True)
File “/opt/spinalcordtoolbox-5.2.0/python/envs/venv_sct/lib/python3.6/os.py”, line 220, in makedirs
mkdir(name, mode)
OSError: [Errno 30] Read-only file system: ‘/opt/spinalcordtoolbox-5.2.0/data/deepseg_models/model_seg_mice_gm-wm_dwi_unet2d-multichannel-softseg’
I’m not sure whether I’ve done something wrong or software issue.

Could you please have a look at this issue and how to solve it out?

Many thanks in advance…

Cheers,

Ibrahim

I was able to reproduce your issue by installing SCT to the opt/ directory (as you have).

opt/ is owned by root by default, and the default permissions are rwxr-xr-x. This means that the owner, root, has write permissions, but “other” users don’t, hence the error.

One solution is to change ownership of the affected folder. This will grant write permissions to the new owner. Could you please run the following command to change the ownership of the SCT directory? (source)

sudo chown -R $USER:$USER /opt/spinalcordtoolbox-5.2.0/

After running this command, I was able to install models OK. :slightly_smiling_face:

Kind regards,
Joshua

1 Like

Hi @joshuacwnewton,

Thank you very much for your help. Now it’s working as expected. The model has been loaded successfully as instructed.

Cheers,

Ibrahim

2 Likes