Error in recon-all command in freesurfer

Summary of what happened:

I get the following error running recon-all. How should I address it? Thanks.

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

recon-all -s subj01 -i home/reza/Desktop/subj1.nii -all

Version:

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

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

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

ERROR: You are trying to re-run an existing subject with (possibly) new

input data (-i). If this is truly new input data, you should delete the
subject folder and re-run, or specify a different subject name. If you
 are continuing an analysis of an existing subject, then omit all -i flags.

Screenshots / relevant information:


Hi @Reza,

As the error message suggests, if you are continuing analysis of the same subject and want to resume recon-all from an earlier point in the pipeline, remove the -i argument. Otherwise, if you want to start again or use different input data, remove the preexisting output folder and run the same code again.

Best,
Steven

Hi everyone, unfortunately I couldn’t solve my problem yet,please show me a practical solution to fix that error.
Thanks a million
Note: I have the licencense.txt


$export FREESURFER _HOME =/home/reza/Downloads/freesurfer 

$source $FREESURFER _HOME/SetUpFreeSurfer.sh

SUBJECT _DIR=/home/reza/Downloads/freesurfer/subjects 

$my_subject=test1

$my NIfTI=/home/reza/Downloads/freesurfer/subjects/image1.nii

$ recon-all  -i $my_NIfTI  -s $my_subject -all

 Error: freesurfer  license file /home/reza/Downloads/freesurfer/.license  not  found.

Hi @Reza,

Where is your license file located? If not already there, can you put it in /home/reza/Downloads/freesurfer? Alternatively, you can run export FS_LICENSE /PATH/TO/license.txt, replacing the path with where it exists on your machine.

Best,
Steven

Hi Steven
I’ve changed my previous command lines to the following lines, but still I have that problem, please help me to solve it.
Thank you so much.
$ chmod 755 $HOME

$ chmod 755 $HOME/Downloads

$ export FREESURFER_HOME =/home/reza/Downloads/license.txt

$export FREESURFER _HOME =/home/reza/Downloads/freesurfer 

$source $FREESURFER _HOME/SetUpFreeSurfer.sh

$ export SUBJECT _DIR=/home/reza/Downloads/freesurfer/subjects 

$my_subject=test1

$my NIfTI=/home/reza/Downloads/freesurfer/subjects/image1.nii

$ recon-all  -i $my_NIfTI  -s $my_subject -all

 Error: freesurfer  license file /home/reza/Downloads/freesurfer/.license  not  found.

Actually I couldn’t change the path from

$ export FREESURFER_HOME=/home/reza/Downloads/license.txt

to the
$ export FREESURFER _HOME =/home/reza/Downloads/freesurfer/license.txt

Hi @Reza,

Can you try to do what I said in my last post?

Best,
Steven