Every time I try to use an sct command on an .nii or .nii.gz image, I get the following error:
--
Spinal Cord Toolbox (4.3)
Error: make sure /home/Philipp/001_HWS.nii is an image.
Traceback (most recent call last):
File "/home/philipp/sct_4.3/scripts/sct_label_utils.py", line 875, in <module>
main()
File "/home/philipp/sct_4.3/scripts/sct_label_utils.py", line 864, in main
verbose=verbose, vertebral_levels=vertebral_levels, value=value, msg=msg, fname_previous=input_fname_previous)
File "/home/philipp/sct_4.3/scripts/sct_label_utils.py", line 60, in __init__
self.image_input = Image(fname_label, verbose=verbose)
File "/home/philipp/sct_4.3/spinalcordtoolbox/image.py", line 243, in __init__
self.loadFromPath(param, verbose)
File "/home/philipp/sct_4.3/spinalcordtoolbox/image.py", line 347, in loadFromPath
self.data = self.im_file.get_data()
AttributeError: 'NoneType' object has no attribute 'get_data'
I’m running this command through an ssh connection on an ubuntu server. The file definitely exists and is a NIFTI image. Does anyone know what’s happening here?