Skip to content

ENH: More verbose description when a faulty results file is loaded #2920

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

Merged
merged 1 commit into from
Apr 19, 2019

Conversation

oesteban
Copy link
Contributor

For reasons yet to be identified, some fMRIPrep (e.g. nipreps/fmriprep#1266) runs failed with:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 528, in _get_inputs
    output_value = results.outputs.trait_get()[output_name]
AttributeError: 'NoneType' object has no attribute 'trait_get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 410, in run
    cached, updated = self.is_cached()
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 296, in is_cached
    hashed_inputs, hashvalue = self._get_hashval()
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 490, in _get_hashval
    self._get_inputs()
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 530, in _get_inputs
    output_value = results.outputs.dictcopy()[output_name]
AttributeError: 'NoneType' object has no attribute 'dictcopy'

This PR identifies the situation earlier and provides more interpretable feedback.

@codecov-io
Copy link

codecov-io commented Apr 19, 2019

Codecov Report

Merging #2920 into master will decrease coverage by 3.11%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2920      +/-   ##
==========================================
- Coverage   67.57%   64.45%   -3.12%     
==========================================
  Files         343      342       -1     
  Lines       43645    44386     +741     
  Branches     5428     5541     +113     
==========================================
- Hits        29494    28610     -884     
- Misses      13447    14687    +1240     
- Partials      704     1089     +385
Flag Coverage Δ
#smoketests ?
#unittests 64.45% <50%> (-0.56%) ⬇️
Impacted Files Coverage Δ
nipype/pipeline/engine/nodes.py 77.61% <50%> (-6.92%) ⬇️
nipype/interfaces/nilearn.py 40% <0%> (-56.67%) ⬇️
nipype/utils/spm_docs.py 25.92% <0%> (-44.45%) ⬇️
nipype/interfaces/freesurfer/base.py 50% <0%> (-30.51%) ⬇️
nipype/utils/logger.py 59.7% <0%> (-29.86%) ⬇️
nipype/algorithms/rapidart.py 35% <0%> (-29.42%) ⬇️
nipype/interfaces/spm/base.py 58.08% <0%> (-29.05%) ⬇️
nipype/utils/provenance.py 55.73% <0%> (-28.35%) ⬇️
nipype/interfaces/fsl/model.py 55.26% <0%> (-25.35%) ⬇️
nipype/testing/fixtures.py 77.33% <0%> (-21.34%) ⬇️
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44ed184...4908efc. Read the comment docs.

@oesteban
Copy link
Contributor Author

WDYT @satra? This may help diagnose lots of errors we are registering from fMRIPrep

@satra satra merged commit 62bf7f0 into nipy:master Apr 19, 2019
@effigies effigies added this to the 1.2.0 milestone Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants