Fmriprep error - Preprocessing did not finish successfully

Thank you for the suggestions, Steven.

When I opened nifty image for run 1 in FSLEYES, I get this image. Please see attachment:

I don’t know why the images are so blurry. Would you know why and how can I fix this?

The output of fslinfo on the images might be more informative. Without me knowing more about your images I can’t say why it looks blurry.

Best,
Steven

Sure thing -please see the attached file.

fsl_info.txt (3.0 KB)

Many thanks,

Rubina

According to the data source field of fslinfo, it looks like the file is not .nii.gz , but just .nii. Is that correct?

Yes, that’s correct.

Well that explains it! it’s not a gzip file. You should use gzip to zip all the files so they end with .nii.gz

1 Like

Thank you so much for this response! (I’ve been stuck on this problem for weeks!)

I have one final follow-up question. I’m trying to convert .nii to .nii.gz with 7-Zip File Manger but every time I extract the file it goes back to .nii? Is there another way to get the extension .nii.gz?

Don’t extract the file, most neuroimaging software (besides SPM) are designed to work with .nii.gz

Thank you once again for your help, Steven.

I’ll try running fMRIPrep again.

Hi Steven,

I’m sorry to bother you again but I used gzip to zip all the files so they end with .nii.gz and ran the code again but I still get the same crash errors. In particular, anatomical processing is complete but functional processing throws me errors. In addition to these errors, recon all is complete but I get a message saying it is not running.

I would welcome any suggestions or recommendations you have to move forward in fixing these errors. I also want to add that I really appreciate your help so far :slight_smile:

Best,

Rubina

Hello Steven,
I had a problem like Loris but the difference is that I worked on openneuro data and didnt have any problem
But when I wanted to work on my main data I faced many errors.

running this code for one subject;

docker run -ti --rm -v $HOME/folder:/data:ro\ -v $HOME/output:/out -v $HOME/freesurfer/license.txt:/opt/freesurfer/license.txt nipreps/fmriprep:latest /data /out participant --participant_label mp0001 --skip-bids-validation

I faced the first error;

raise BIDSValidationError(
bids.exceptions.BIDSValidationError: ‘dataset_description.json’ is missing from project root. Every valid BIDS dataset must have this file.
Example contents of ‘dataset_description.json’:
{“Name”: “Example dataset”, “BIDSVersion”: “1.0.2”}

after that I tried to find a json file to fix this program

I used a json file that I’ve had already from the past of the data of oppenneuro
and I used this code;

docker run -ti --rm -v $HOME/folder:/data:ro -v $HOME/output:/out -v $HOME/freesurfer/license.txt:/opt/freesurfer/license.txt nipreps/fmriprep:latest /data /out participant --participant_labe mp0001 --skip-bids-validation

now I faced this error

Preprocessing did not finish successfully. Errors occurred while processing data from participants: mp0001 (31). Check the HTML reports for details.

((The error I encountered referred to this statement; Check the HTML reports for details.
but I couldn’t find HTML reports))

I’m trying to learn working with fmriprep and I dont know how much my question is travial or inappropriate
I’m really appreciative of your time and consideration

Best,
Roya

Hi @roqa

You should be able to look in the fmriprep output subject folder in logs to see an error report. Are your data BIDS valid? The lack of dataset description is a good indication that they may not be valid.

Best,
Steven

Thank you for your reply so soon,
I don’t know about data BIDS valid, how should I know about it?
In my output folder I have only one logs folder which is empty

You can read more about the BIDS structure here https://bids.neuroimaging.io/ and use the BIDS validator tool to check if your data are valid GitHub - bids-standard/bids-validator: Validator for the Brain Imaging Data Structure

Thank you so much Steven
I appreciate your help and time

Hello Steven,

I did BIDS validation
I faced many errors like these;

Type:		Error
File:		sub-mp0001_ses-01_run-02_bold.nii.gz
Location:		sub-mp0001/ses-01/func/sub-mp0001_ses-01_run-02_bold.nii.gz
Reason:		Session label in the filename doesn't match with the path of the file. File seems to be saved in incorrect session directory.
Evidence:	File: /ses-01/func/sub-mp0001_ses-01_run-02_bold.nii.gz is saved in incorrect session directory as per ses-id in filename.

File Path: The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification.

Type:		Warning

.
.
.

Is it possible to fix them

Thank you for your help and time

Yes they can be fixed, but this is now a different issue than what was described in the original post, so a new topic should be made.

Sure,
Thank you for your answer so soon,

Best wishes,
Roya