Registration error v.4.3

Dear experts,

I have python 3.7; however, when I run the sct_register_multimodal or the sct_register_to_template scripts, I obtain the following message:


Generate output files…
WARNING: File PAM50_t1_reg.nii.gz already exists. Deleting it…
File created: PAM50_t1_reg.nii.gz
WARNING: File subj01_eddy_fa_crop_reg.nii already exists. Deleting it…
Traceback (most recent call last):
File “/home/jnavas/sct_4.3/python/envs/venv_sct/lib/python3.6/shutil.py”, line 550, in move
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: ‘/tmp/sct-20201006165629.329375-register-cws9p3au/dest_reg.nii’ -> ‘subj1_eddy_fa_crop_reg.nii’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/jnavas/sct_4.3/scripts/sct_register_multimodal.py”, line 372, in
main()
File “/home/jnavas/sct_4.3/scripts/sct_register_multimodal.py”, line 348, in main
path_out=path_out)
File “/home/jnavas/sct_4.3/scripts/msct_register.py”, line 338, in register_wrapper
os.path.join(path_tmp, “dest_reg.nii”), os.path.join(path_out, file_out_inv + ext_dest), param.verbose)
File “/home/jnavas/sct_4.3/scripts/sct_utils.py”, line 749, in generate_output_file
shutil.move(fname_in, fname_out)
File “/home/jnavas/sct_4.3/python/envs/venv_sct/lib/python3.6/shutil.py”, line 564, in move
copy_function(src, real_dst)
File “/home/jnavas/sct_4.3/python/envs/venv_sct/lib/python3.6/shutil.py”, line 264, in copy2
copystat(src, dst, follow_symlinks=follow_symlinks)
File “/home/jnavas/sct_4.3/python/envs/venv_sct/lib/python3.6/shutil.py”, line 205, in copystat
follow_symlinks=follow)
PermissionError: [Errno 1] Operation not permitted

How can I fix this error?

PD. The whole scripts:
sct_register_to_template -i ${base}-T2_SAG_resize.nii -s ${base}-T2_SAG_resize_seg.nii -l labels_vert.nii -c t2 -qc …/QControl

sct_register_multimodal -i /home/jnavas/sct_4.3/data/PAM50/template/PAM50_t1.nii.gz -iseg /home/jnavas/sct_4.3/data/PAM50/template/PAM50_cord.nii.gz -d ${base}_eddy_fa_crop.nii -dseg /media/Data/PEH/SPINE/spine_masks/${base}_WholeSpine_Mask_reg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,metric=MeanSquares,smooth=1,iter=3 -initwarp /media/Data/PEH/SPINALCORD/SAG/orig/${base}/warp_template2anat.nii.gz -initwarpinv /media/Data/PEH/SPINALCORD/SAG/orig/${base}/warp_anat2template.nii.gz -qc …/QControl

I really appreciate any help you can provide.

Hi Javier,

I’m sorry to hear you’ve run into this error. I have some questions about the system you are running SCT on:

  • Which location are you running the script from? (i.e. What is your current working directory when you run the script?)
  • What type of storage is /media/Data? (External drive? Network share?)

Thanks much! :slightly_smiling_face:
Joshua

Hi Joshua,

the /media/Data/ is a shared Server of my Insitute.
Should I run the script in my own pc?

Yes, that would be helpful for isolating the problem. Please go ahead and try that. Thank you! :slightly_smiling_face:

Hi Javier. I’m just following up on this issue. I noticed a comment has been marked as a Solution. Has this issue been resolved for you?

Thanks!

Hi Joshua, I`m sorry for not reply to your comment. The script runs without errors on my local folder. So the problem was solved.

Thank you again

slight_smile:

1 Like