External Email - Use Caution
This looks like a file system access/permissions problem, i.e., the hdf5 python code being run from where freesurfer is installed, namely the code in /usr/local/freesurfer/8.1.0/python/lib/python3.8/site-packages/h5py/_hl/files.py claims it cannot see or read the file via the absolute path /models/mca-dura.both-lh.nstd21.fhs.h5
Such an error might occur if /models/mca-dura.both-lh..nstd21.fhs.h5 is not a valid hdf5 file, or /models is a mount point or soft link in your computers file system. It does however look like some previous code was able to open /models/mca-dura.both-lh.nstd21.fhs.h5 and load in the weights. You could try cd’ing to /usr/local/freesurfer/8.1.0/python/lib/python3.8/site-packages and see if you can read the file, i.e., “cat /models/mca-dura.both-lh.nstd21.fhs.h5”. I would at least try re-locating that model file to be under a known path where you always have read/write permission like your home directory. - R.
/usr/local/freesurfer/8.1.0/python/scripts/mri_sclimbic_seg --model /models/mca-dura.both-lh.nstd21.fhs.h5 --ctab /data2/FST1T2Res/002_S_0295_006/mri/tmp.mri_mcadura_seg.271283/dumca.lh.ctab --keep_ac --percentile 99.9 --vmp --output-base mcadura --conform --logfile mri_mcadura_seg.log --no-cite-sclimbic --threads 1 --fov 72 --i /data2/FST1T2Res/002_S_0295_006/mri/tmp.mri_mcadura_seg.271283/invol.lh.crop.nii.gz --o /data2/FST1T2Res/002_S_0295_006/mri/tmp.mri_mcadura_seg.271283/seg.lh.mgz Keeping anterior commissure in vols and stats Using CPU Using 1 thread(s) Loaded lookup table /data2/FST1T2Res/002_S_0295_006/mri/tmp.mri_mcadura_seg.271283/dumca.lh.ctab Loaded population stats /usr/local/freesurfer/8.1.0/models/sclimbic..volstats.csv nb_labels 2 inshape (72, 72, 72) features 24 (None, 72, 72, 72, 1) Loading weights from /models/mca-dura.both-lh.nstd21.fhs.h5 ----------------------- segmenter = LimbicSegmenter(model_file=model_file, File "/usr/local/freesurfer/8.1.0/python/scripts/mri_sclimbic_seg", line 425, in __init__ self.model.load_weights(model_file, by_name=True) File "/usr/local/freesurfer/8.1.0/python/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 70, in error_handler raise e.with_traceback(filtered_tb) from None File "/usr/local/freesurfer/8.1.0/python/lib/python3..8/site-packages/h5py/_hl/files.py", line 562, in __init__ fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr) File "/usr/local/freesurfer/8.1.0/python/lib/python3..8/site-packages/h5py/_hl/files.py", line 235, in make_fid fid = h5f.open(name, flags, fapl=fapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5f.pyx", line 102, in h5py.h5f.open FileNotFoundError: [Errno 2] Unable to synchronously open file (unable to open file: name = '/models/mca-dura.both-lh.nstd21.fhs.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)