Skip to content

AttributeError when asking for Workfow.inputs fields in jupyter notebook #2119

Open
@djarecka

Description

@djarecka

Summary

I've noticed that I'm getting errors when running first time Worflow.inputs.something within jupyter notebook. The problem doesn't happen when I write a python script, it doesn't happen when I ask first for Workflow.inputs and later Worflow.inputs.something or when print(Worflow.inputs.something). It looks like some weird interaction between jupyter and traits. Want to check if it still happens with traitlets.

How to replicate the behavior

from nipype.workflows.fmri.fsl import create_susan_smooth
susan = create_susan_smooth(separate_masks=False)
susan.inputs.inputnode

Actual behavior

Exception occurred in traits notification handler for object:
fwhm =
in_files =
mask_file =
, trait: trait_added, old value: , new value: ipython_canary_method_should_not_exist
Traceback (most recent call last):
File "/opt/conda/lib/python3.5/site-packages/traits/trait_notifiers.py", line 519, in _dispatch_change_event
self.dispatch( handler, *args )
File "/opt/conda/lib/python3.5/site-packages/traits/trait_notifiers.py", line 482, in dispatch
handler( *args )
File "/opt/conda/lib/python3.5/site-packages/nipype/pipeline/engine/workflows.py", line 791, in _set_input
object.traits()[name].node.set_input(name, newvalue)
AttributeError: 'NoneType' object has no attribute 'set_input'

Expected behavior

No error

Platform details:

nipype/workshops: latest-complete docker image with nipype 0.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions