Open mih opened 5 years ago
Here is a three-liner to reproduce the crash
# get datalad dataset
% datalad install https://github.com/psychoinformatics-de/studyforrest-data-visualrois.git
# fetch file content for a single 2nd-level analysis output directory
% datalad get sub-01/2ndlvl.gfeat
# crash
% nidmfsl sub-01/2ndlvl.gfeat -g controls 3 -o /tmp/
So it seems that this is an issue with nidmfsl
not wanting to, or not being design for running on a 2nd-level analysis (please pardon my ignorance). When I point it do a 2nd-level FEAT output dir, I get this situation:
-> shutil.copy(file_copied, new_file)
(Pdb) new_file
'/tmp/nidm-l4sd7zht/SearchSpaceMask.nii.gz'
(Pdb) file_copied
'/tmp/studyforrest-data-visualrois/sub-01/2ndlvl.gfeat/cope7.feat/mask.nii.gz'
for every contrast, it aims to write to the same file. For some reason (no idea yet why), these files are created with 600 permissions (r--r--r--), hence the "permission denied" error. It should be OK to overwrite this file -- I don't think FSL supports per-contrast masks.
@mih: Thanks for digging that up! in principle nidmfsl
is designed to work with both first-level and second-level analyses (e.g. this one in our test data). Let me try and see if I can find why this is not behaving as expected on your dataset.
The export now works for me on your data using: https://github.com/incf-nidash/nidmresults/pull/54 and https://github.com/incf-nidash/nidmresults-fsl/pull/156.
I'll check that the tests pass before merging.
Log:
/tmp
is, as usual mod-777. The directory '/tmp/nidm-38mhzddr/' does not exist at the time of the crash.