Skip to content

Some interfaces breaking as MapNodes with py2 + Traits 5.0.0  #2913

Closed
@mgxd

Description

@mgxd

Summary

It looks like there is some incompatibility currently with FSL interfaces (and possibly others) with py2 and traits 5.0

https://neurostars.org/t/cant-pickle-instancemethod-when-using-mapnode-in-nipype/4052/4?u=mgxd

#2910 #2882

Actual behavior

from nipype import MapNode, Workflow
from nipype.interfaces.fsl import BET

better = MapNode(BET(), iterfield=['in_file'], name='better')
better.inputs.in_file = ['/path/to/some/image'] * 2
wf = Workflow('testwf')
wf.add_nodes([better])
wf.run()
...
...
TypeError: can't pickle instancemethod objects

Expected behavior

[Node] Finished "testwf.better".

Platform details:

{'commit_hash': 'ec7457c23',
 'commit_source': 'installation',
 'networkx_version': '2.2',
 'nibabel_version': '2.3.0',
 'nipype_version': '1.1.3',
 'numpy_version': '1.15.2',
 'pkg_path': '/om2/user/mathiasg/miniconda/envs/py2/lib/python2.7/site-packages/nipype',
 'scipy_version': '1.1.0',
 'sys_executable': '/om2/user/mathiasg/miniconda/envs/py2/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.14 |Anaconda, Inc.| (default, Mar 12 2018, 12:37:12) \n[GCC 7.2.0]',
 'traits_version': '5.0.0'}

Execution environment

Choose one

  • My python environment outside container

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions