bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

Annexed files without local content crash validation

Open nellh opened this issue 2 years ago • 1 comments
trafficstars

This is for the schema validator.

error: Uncaught NotFound: No such file or directory (os error 2), open '/home/nell/Git/crn/datasets/ds000117/sub-01/ses-mri/anat/sub-01_ses-mri_acq-mprage_T1w.nii.gz'
    return Deno.openSync(this._getPath(), openOptions)
                ^
    at Object.openSync (deno:runtime/js/40_files.js:40:21)
    at BIDSFileDeno.#openHandle (file:///home/nell/Git/crn/bids-validator/bids-validator/src/files/deno.ts:108:17)
    at BIDSFileDeno.readBytes (file:///home/nell/Git/crn/bids-validator/bids-validator/src/files/deno.ts:94:36)
    at loadHeader (file:///home/nell/Git/crn/bids-validator/bids-validator/src/files/nifti.ts:5:20)
    at BIDSContext.loadNiftiHeader (file:///home/nell/Git/crn/bids-validator/bids-validator/src/schema/context.ts:155:27)
    at BIDSContext.asyncLoads (file:///home/nell/Git/crn/bids-validator/bids-validator/src/schema/context.ts:185:10)
    at async validate (file:///home/nell/Git/crn/bids-validator/bids-validator/src/validators/bids.ts:77:5)
    at async main (file:///home/nell/Git/crn/bids-validator/bids-validator/src/main.ts:23:24)
    at async file:///home/nell/Git/crn/bids-validator/bids-validator/src/main.ts:41:1

nellh avatar Feb 01 '23 20:02 nellh

This should probably throw a validation error in this situation but we want a flag to not read file contents that would also avoid this error. Open question, should we automatically ignore missing file contents when we see a git-annex dataset or is that too magic?

nellh avatar Feb 07 '23 16:02 nellh

Not sure if this is done, so bumping it for your consideration, @nellh.

effigies avatar Aug 01 '24 16:08 effigies

This is fixed, there could be some improvements to handling the missing content but the important part of not crashing in this situation is handled.

nellh avatar Aug 01 '24 16:08 nellh