Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TraitError: The trait 'out_report' of a SummaryOutputSpec instance is an existing file name, but the path <> does not exist #936

Closed
mainux opened this issue Jan 18, 2018 · 9 comments
Labels
Milestone

Comments

@mainux
Copy link

mainux commented Jan 18, 2018

Dear all,

when I try to run fmriprep I get a lot of errors for every subject:
"about"
"bold_preproc_report_wf.pre_tsnr"
"bold_reference_wf.validate"
"anat_preproc_wf.anat_template_wf.t1_template_dimensions"
"summary".
It is always the same, it tries to find a particular file and the path does not exist.

I'm running the following command:
fmriprep /home/mtermenon/public/HBP_MaiteCesar/BIDS/ /home/mtermenon/mtermenon/fMRIprep participant -w /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/ > /home/mtermenon/mtermenon/fMRIprep/fMRIprep_terminal.txt

Thanks in advance for your support, I'm totally lost.

Best,

Maite

@jdkent
Copy link
Collaborator

jdkent commented Jan 18, 2018

Thanks for reaching out. A couple of questions will help me slim down the issues.

  1. How did you install fmriprep?. Also what version, as @oesteban pointed out.
  2. could you paste the error messages you got for a particular subject? (you can format the output nicely by placing the copy/pasted output between two sets of triple backticks ``` output ```)
  3. Does the machine you are running fmriprep on have at least 8 GB of RAM?
  4. Does your dataset pass the BIDS Validator - @chrisfilo

example formatting:

this is nicely formatted output

@oesteban
Copy link
Member

Dear Maite,

It'd be great to have all the details @jdkent requested. In particular, I'd bet you are using fmriprep-1.0.4.

Besides that, all those nodes have something in common: they are trying to write outside your work directory (passed in with -w flag). I'm currently testing a development version that I think would work for you.

Please let us know your details.

@chrisgorgo
Copy link
Contributor

chrisgorgo commented Jan 18, 2018 via email

@mainux
Copy link
Author

mainux commented Jan 19, 2018

Hi all, thanks for your answers!

I can say that:

  1. The IT department is the one that installs the sw, but we don't use docker so I guess it was manually installed.

  2. About the outputs, see below:

  3. Yes, I'm running it on a cluster with a lot of RAM.

  4. Yes, the dataset passes the BIDS validator.

Thanks in advance,

Maite

2.1 about:

Working directory: /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/about

Node inputs:

command = /opt/anaconda3/bin/fmriprep /home/mtermenon/public/HBP_MaiteCesar/BIDS/ /home/mtermenon/mtermenon/fMRIprep participant -w /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/
ignore_exception = False
version = 1.0.3

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 326, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 443, in run
    result = self._run_interface(execute=True)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 520, in _run_interface
    return self._run_command(execute)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 614, in _run_command
    _save_resultfile(result, outdir, self.name)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/utils.py", line 239, in save_resultfile
    outputs, relative=True, basedir=cwd))
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/util/deprecated.py", line 32, in wrapper
    return fn(*args, **kw)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1551, in set
    trait_change_notify=trait_change_notify, **traits)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1543, in trait_set
    setattr( self, name, value )
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/traits_extension.py", line 109, in validate
    self.info_text, value))
traits.trait_errors.TraitError: The trait 'out_report' of a SummaryOutputSpec instance is an existing file name, but the path  '/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/about/report.html' does not exist.```

2.2 pre-tsnr: 
``` Node: fmriprep_wf.single_subject_08HBP3439S2_wf.func_preproc_task_rest_run_01_wf.bold_preproc_report_wf.pre_tsnr
Working directory: /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_preproc_report_wf/pre_tsnr

Node inputs:

detrended_file = detrend.nii.gz
ignore_exception = False
in_file = ['/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_run-01_bold.nii.gz']
mean_file = mean.nii.gz
regress_poly = <undefined>
stddev_file = stdev.nii.gz
tsnr_file = tsnr.nii.gz

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 65, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 443, in run
    result = self._run_interface(execute=True)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 520, in _run_interface
    return self._run_command(execute)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 614, in _run_command
    _save_resultfile(result, outdir, self.name)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/utils.py", line 239, in save_resultfile
    outputs, relative=True, basedir=cwd))
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/util/deprecated.py", line 32, in wrapper
    return fn(*args, **kw)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1551, in set
    trait_change_notify=trait_change_notify, **traits)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1543, in trait_set
    setattr( self, name, value )
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/traits_extension.py", line 109, in validate
    self.info_text, value))
traits.trait_errors.TraitError: The trait 'stddev_file' of a TSNROutputSpec instance is an existing file name, but the path  '/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_preproc_report_wf/pre_tsnr/stdev.nii.gz' does not exist. ```

2.3 Validate:
``` Node: fmriprep_wf.single_subject_08HBP3439S2_wf.func_preproc_task_rest_run_01_wf.bold_reference_wf.validate
Working directory: /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_reference_wf/validate

Node inputs:

ignore_exception = False
in_file = /home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_run-01_bold.nii.gz

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 65, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 443, in run
    result = self._run_interface(execute=True)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 520, in _run_interface
    return self._run_command(execute)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 614, in _run_command
    _save_resultfile(result, outdir, self.name)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/utils.py", line 239, in save_resultfile
    outputs, relative=True, basedir=cwd))
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/util/deprecated.py", line 32, in wrapper
    return fn(*args, **kw)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1551, in set
    trait_change_notify=trait_change_notify, **traits)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1543, in trait_set
    setattr( self, name, value )
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/traits_extension.py", line 109, in validate
    self.info_text, value))
traits.trait_errors.TraitError: The trait 'out_file' of a ValidateImageOutputSpec instance is an existing file name, but the path  '/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/func_preproc_task_rest_run_01_wf/bold_reference_wf/validate/sub-08HBP3439S2_task-rest_run-01_bold_valid.nii.gz' does not exist. ```

2.4 t1_template_dimensions:
``` Node: fmriprep_wf.single_subject_08HBP3439S2_wf.anat_preproc_wf.anat_template_wf.t1_template_dimensions
Working directory: /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/anat_preproc_wf/anat_template_wf/t1_template_dimensions

Node inputs:

ignore_exception = False
max_scale = 3.0
t1w_list = ['/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/anat/sub-08HBP3439S2_T1w.nii.gz']

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 65, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 443, in run
    result = self._run_interface(execute=True)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 520, in _run_interface
    return self._run_command(execute)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 614, in _run_command
    _save_resultfile(result, outdir, self.name)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/utils.py", line 239, in save_resultfile
    outputs, relative=True, basedir=cwd))
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/util/deprecated.py", line 32, in wrapper
    return fn(*args, **kw)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1551, in set
    trait_change_notify=trait_change_notify, **traits)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1543, in trait_set
    setattr( self, name, value )
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/traits_extension.py", line 109, in validate
    self.info_text, value))
traits.trait_errors.TraitError: The trait 'out_report' of a TemplateDimensionsOutputSpec instance is an existing file name, but the path  '/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/anat_preproc_wf/anat_template_wf/t1_template_dimensions/report.html' does not exist. ```

2.5 Summary:
``` Node: fmriprep_wf.single_subject_08HBP3439S2_wf.summary
Working directory: /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/summary

Node inputs:

bold = ['/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petit_acq-AP_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petit_acq-AP_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petit_acq-PA_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petit_acq-PA_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petit_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petit_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petitPhase_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-petitPhase_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-pinel_acq-AP_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-pinel_acq-AP_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-pinel_acq-PA_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-pinel_acq-PA_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-pinel_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-pinel_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_acq-AP_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_acq-AP_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_acq-PA_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_acq-PA_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-rest_run-02_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-restPhase_run-01_bold.nii.gz', '/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/func/sub-08HBP3439S2_task-restPhase_run-02_bold.nii.gz']
ignore_exception = False
output_spaces = ['template', 'fsaverage5']
subject_id = sub-08HBP3439S2
subjects_dir = /home/mtermenon/mtermenon/fMRIprep/freesurfer
t1w = ['/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/anat/sub-08HBP3439S2_T1w.nii.gz']
t2w = ['/home/mtermenon/public/HBP_MaiteCesar/BIDS/sub-08HBP3439S2/anat/sub-08HBP3439S2_T2w.nii.gz']
template = MNI152NLin2009cAsym

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 326, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 443, in run
    result = self._run_interface(execute=True)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 520, in _run_interface
    return self._run_command(execute)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 614, in _run_command
    _save_resultfile(result, outdir, self.name)
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/utils.py", line 239, in save_resultfile
    outputs, relative=True, basedir=cwd))
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/util/deprecated.py", line 32, in wrapper
    return fn(*args, **kw)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1551, in set
    trait_change_notify=trait_change_notify, **traits)
  File "/opt/anaconda3/lib/python3.6/site-packages/traits/has_traits.py", line 1543, in trait_set
    setattr( self, name, value )
  File "/opt/anaconda3/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/traits_extension.py", line 109, in validate
    self.info_text, value))
traits.trait_errors.TraitError: The trait 'out_report' of a SubjectSummaryOutputSpec instance is an existing file name, but the path  '/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work/fmriprep_wf/single_subject_08HBP3439S2_wf/summary/report.html' does not exist. ```

@oesteban
Copy link
Member

Thanks a lot, it looks like a python installation. We will roll out a new version 1.0.5 very soon, so please ask the IT department to upgrade. I am convinced that will work for you.

Meanwhile, could you also post the output of:

find /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/ -maxdepth 4 -type d

and

find /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work -maxdepth 4 -type d

It seems fmriprep is getting confused with your paths. Where are you calling fmriprep from? Please, also check you are not running out of space in your storage resources.

@oesteban oesteban added the bug label Jan 19, 2018
@oesteban oesteban changed the title Not able to run fmriprep TraitError: The trait 'out_report' of a SummaryOutputSpec instance is an existing file name, but the path <> does not exist Jan 19, 2018
@oesteban oesteban added this to the 1.1.0 milestone Jan 19, 2018
@mainux
Copy link
Author

mainux commented Jan 22, 2018

Thanks for your answer.

The output of:
find /home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work/ -maxdepth 4 -type d
is
/home/mtermenon/public/HBP_MaiteCesar/FMRIPREP_work

The output of:
find /bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work -maxdepth 4 -type d
is
/bcbl/home/public/HBP_MaiteCesar/FMRIPREP_work

An yes, I have plenty of space, 1.4T

@oesteban
Copy link
Member

Hi @mainux, it is surprising that there are no subfolders in your work directory.

I've been working on this and we just released version 1.0.5. That should address your issue, but since it is hard to reproduce, I can't promise it will.

Please ask the IT department to upgrade fmriprep (since they have done the full installation, it should not be hard to do - nonetheless, let them know that we will be happy to help assisting with that).

Let us know if that gets your fmriprep going.

Yes, unless huge datasets, 1.4TB should be enough :)

@mainux
Copy link
Author

mainux commented Jan 26, 2018

Hi,

thanks for your help. Unfortunately, the update did not fix the problem, but I changed the paths when running fmriprep and it works better, so instead running it with /home/mtermenon ... I'm directly running it with /bcbl/home/...

I'm having other issues now related with freesurfer but that problem is over.

About the no subfolders in my work directory, sorry about that, I had deleted the content of the folder just before and did not realize. I'll paste it again if you are interested.

Best,

Maite

@oesteban
Copy link
Member

This error seems related to the way Python resolves some realpaths with links. As the workaround of using the realpath /bcbl worked for you (and seems to be the solution on some other systems, nipy/nipype#2380), I'll close this one. We'll reopen if it replicates on additional users' settings.

As regards FreeSurfer, could you report this new issue?

Thanks very much for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants