Skip to content

Unable to process datasets from NFS mounted storage #16

Closed

Description

@sebastientourbier

Error

RuntimeError: Command:
5ttgen freesurfer -nocrop -sgm_amyg_hipp /tmp/derivatives/cmp/sub-001/ses-20170714/anat/sub-001_ses-20170714_desc-aparcaseg_dseg.nii.gz mrtrix_5tt.nii.gz
Standard output:

Standard error:
5ttgen: 
5ttgen: Note that this script makes use of commands / algorithms that have relevant articles for citation. Please consult the help page (-help option) for more information.
5ttgen: 
5ttgen: Generated temporary directory: /tmp/derivatives/nipype/sub-001/ses-20170714/diffusion_pipeline/preprocessing_stage/mrtrix_5tt/5ttgen-tmp-EQMGFD/
Command:  mrconvert /tmp/derivatives/cmp/sub-001/ses-20170714/anat/sub-001_ses-20170714_desc-aparcaseg_dseg.nii.gz /tmp/derivatives/nipype/sub-001/ses-20170714/diffusion_pipeline/preprocessing_stage/mrtrix_5tt/5ttgen-tmp-EQMGFD/input.mif
5ttgen: Changing to temporary directory (/tmp/derivatives/nipype/sub-001/ses-20170714/diffusion_pipeline/preprocessing_stage/mrtrix_5tt/5ttgen-tmp-EQMGFD/)
Command:  labelconvert input.mif /opt/freesurfer/FreeSurferColorLUT.txt /opt/mrtrix3/share/mrtrix3/_5ttgen/FreeSurfer2ACT_sgm_amyg_hipp.txt indices.mif
Command:  mrcalc indices.mif 1 -eq cgm.mif
Command:  mrcalc indices.mif 2 -eq sgm.mif
Command:  mrcalc indices.mif 3 -eq  wm.mif
Command:  mrcalc indices.mif 4 -eq csf.mif
Command:  mrcalc indices.mif 5 -eq path.mif
Command:  mrcat cgm.mif sgm.mif wm.mif csf.mif path.mif - -axis 3 | mrconvert - result.mif -datatype float32
Command:  5ttcheck result.mif
Command:  mrconvert result.mif /tmp/derivatives/nipype/sub-001/ses-20170714/diffusion_pipeline/preprocessing_stage/mrtrix_5tt/mrtrix_5tt.nii.gz
5ttgen: Changing back to original directory (/tmp/derivatives/nipype/sub-001/ses-20170714/diffusion_pipeline/preprocessing_stage/mrtrix_5tt)
5ttgen: Deleting temporary directory /tmp/derivatives/nipype/sub-001/ses-20170714/diffusion_pipeline/preprocessing_stage/mrtrix_5tt/5ttgen-tmp-EQMGFD/
Traceback (most recent call last):
  File "/opt/mrtrix3/bin/5ttgen", line 56, in <module>
    app.complete()
  File "/opt/mrtrix3/lib/mrtrix3/app.py", line 268, in complete
    shutil.rmtree(tempDir)
  File "/opt/conda/envs/py27cmp-core/lib/python2.7/shutil.py", line 270, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/opt/conda/envs/py27cmp-core/lib/python2.7/shutil.py", line 268, in rmtree
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/tmp/derivatives/nipype/sub-001/ses-20170714/diffusion_pipeline/preprocessing_stage/mrtrix_5tt/5ttgen-tmp-EQMGFD/'
Return code: 1

What causes the error
I have been successfully running this code on datasets stored locally. The error appeared when we switched to processing a dataset from a NFS mounted storage.
See similar error at https://mail.python.org/pipermail/python-list/2009-July/543694.html

Solution
Until now, we did not find a solution for processing with success the dataset stored on the NFS mounted drive.

Workaround
Make a local copy of the dataset to be processed

Activity

  1. changed the title [-]OSError: [Errno 39] Directory not empty when executing 5ttgen[/-] [+]Enable to process datasets from NFS mounted storage[/+] on Nov 3, 2020
  2. changed the title [-]Enable to process datasets from NFS mounted storage[/-] [+]Unable to process datasets from NFS mounted storage[/+] on Jan 13, 2021
  3. locked and limited conversation to collaborators on Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsupportwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions