Sct_deepseg_sc: error: argument -qc: expected one argument

Hello,

I’m trying to switch from using sct_propseg command for cord segmentation to the deepseg command but it keeps giving me an error message.

I’ve tried many different combinations but in general this is what I was working with: sct_deepseg_sc -i t2.nii -c t2 -qc $qc but it always gives me: argument -qc: expected one argument, and won’t let me proceed. If you have any advice I would greatly appreciate it as I would prefer to collect my data using the deepseg command. Recently updated to 5.8.
Thank you!

Lily

Hi @Lily,

Thank you for your question! I’m happy to help. :slight_smile:

My first suggestion would be to try the command again, but this time putting double-quotes around the $qc part:

sct_deepseg_sc -i t2.nii -c t2 -qc "$qc"

I can only guess (because I don’t know the value of you $qc that you are using), but my hunch is that the $qc variable contains a space in it somewhere. (Perhaps a folder somewhere in the QC path has a space?)

If this is true, then without double-quotes, $qc will be interpreted as two separate arguments, split in two where the space is. So, by adding double-quotes, we can make sure that $qc will be treated as a single argument.

If this doesn’t work, could you please share the value of $qc so I can help you debug further?

Kind regards,
Joshua

Thank you very much for your suggestion, I will try it now!

Thank you very much, you’ve saved me many hours of aimlessly scrolling google. Have a nice weekend!

1 Like