Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7512361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:50:37+00:00 2026-05-29T23:50:37+00:00

I am trying to replace our internal pipeline infrastructure with NiPype. As a test,

  • 0

I am trying to replace our internal pipeline infrastructure with NiPype.

As a test, I want to connect to simple functions where the first gets an input and after some calculation returns an output which gets used for the second function as an input:

import numpy
import nipype.pipeline.engine as pe
from nipype.interfaces.utility import Function
from pipyTestWheels import *


def Connectivity( dtiVolume ):

  print "  CONNECTIVITY1::START"

  print "reading dti Volume " + dtiVolume

  print ">>> performing connectivity *nom*nom*nom*"

  a = numpy.zeros( ( 1000, 1000 ) )

  print "  CONNECTIVITY1::END"

  trkFile = 'another trk file'

  return trkFile

def RegisterFibers( trkFile ):

  print "  REGISTERFIBERS::START"

  print "reading trk File " + trkFile

  print ">>> performing trkFile registration"

  trkFileRegistered = '/tmp/tracksRegistered.trk'

  print "  REGISTERFIBERS::END"

  return trkFileRegistered


def test():

  ConnectivityNode = pe.Node( name='connectivity', interface=Function( function=Connectivity, input_names=['dtiVolume'], output_names=['trkFile'] ) )
  RegisterFibersNode = pe.Node( name='registerFibers', interface=Function( function=RegisterFibers, input_names=['trkFile'], output_names=['trkFileRegistered'] ) )

  pipeline = pe.Workflow( name='testWf' )
  pipeline.add_nodes( [ConnectivityNode, RegisterFibersNode] )
  pipeline.run( dtiVolume='safsafa' )

I get the following error:

Traceback (most recent call last):
  File "pipyTestNipype.py", line 65, in <module>
    test()
  File "pipyTestNipype.py", line 46, in test
    pipeline.run( dtiVolume='safsafa' )
TypeError: run() got an unexpected keyword argument 'dtiVolume'

If I just run pipeline.run(), then I get this error:

INFO:workflow:['execution', 'logging']
INFO:workflow:Running serially.
INFO:workflow:Executing node registerFibers in dir: /tmp/tmpxpW0lR/testWf/registerFibers
ERROR:workflow:['Node registerFibers failed to run on host ipmi.']
INFO:workflow:Saving crash info to /net/pretoria/local_mount/space/pretoria/2/chb/users/daniel.haehn/Projects/scripts/crash-20120215-101717-daniel.haehn-registerFibers.npz
INFO:workflow:Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/plugins/linear.py", line 35, in run
    node.run(updatehash=updatehash)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1141, in run
    self._run_interface(execute=True)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1161, in _run_interface
    self._result = self._run_command(execute)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1253, in _run_command
    result = self._interface.run()
  File "/usr/lib/pymodules/python2.7/nipype/interfaces/base.py", line 775, in run
    runtime = self._run_interface(runtime)
  File "/usr/lib/pymodules/python2.7/nipype/interfaces/utility.py", line 382, in _run_interface
    out = function_handle(**args)
TypeError: RegisterFibers() takes exactly 1 argument (0 given)
Interface Function failed to run. 

INFO:workflow:Executing node connectivity in dir: /tmp/tmptN84LP/testWf/connectivity
ERROR:workflow:['Node connectivity failed to run on host ipmi.']
INFO:workflow:Saving crash info to /net/pretoria/local_mount/space/pretoria/2/chb/users/daniel.haehn/Projects/scripts/crash-20120215-101717-daniel.haehn-connectivity.npz
INFO:workflow:Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/plugins/linear.py", line 35, in run
    node.run(updatehash=updatehash)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1141, in run
    self._run_interface(execute=True)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1161, in _run_interface
    self._result = self._run_command(execute)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1253, in _run_command
    result = self._interface.run()
  File "/usr/lib/pymodules/python2.7/nipype/interfaces/base.py", line 775, in run
    runtime = self._run_interface(runtime)
  File "/usr/lib/pymodules/python2.7/nipype/interfaces/utility.py", line 382, in _run_interface
    out = function_handle(**args)
TypeError: Connectivity() takes exactly 1 argument (0 given)
Interface Function failed to run. 

INFO:workflow:***********************************
ERROR:workflow:could not run node: testWf.registerFibers
INFO:workflow:crashfile: /net/pretoria/local_mount/space/pretoria/2/chb/users/daniel.haehn/Projects/scripts/crash-20120215-101717-daniel.haehn-registerFibers.npz
ERROR:workflow:could not run node: testWf.connectivity
INFO:workflow:crashfile: /net/pretoria/local_mount/space/pretoria/2/chb/users/daniel.haehn/Projects/scripts/crash-20120215-101717-daniel.haehn-connectivity.npz
INFO:workflow:***********************************
Traceback (most recent call last):
  File "pipyTestNipype.py", line 65, in <module>
    test()
  File "pipyTestNipype.py", line 46, in test
    pipeline.run()
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 467, in run
    runner.run(execgraph, updatehash=updatehash, config=self.config)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/plugins/linear.py", line 49, in run
    report_nodes_not_run(notrun)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/plugins/base.py", line 81, in report_nodes_not_run
    raise RuntimeError('Workflow did not execute cleanly. Check log for details')
RuntimeError: Workflow did not execute cleanly. Check log for details

What shall I do?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:50:39+00:00Added an answer on May 29, 2026 at 11:50 pm

    Try this:

    import nipype.pipeline.engine as pe
    from nipype.interfaces.utility import Function
    
    
    def Connectivity(dtiVolume):
        import numpy
        print "  CONNECTIVITY1::START"
        print "reading dti Volume " + dtiVolume
        print ">>> performing connectivity *nom*nom*nom*"
        a = numpy.zeros((1000, 1000))
        print "  CONNECTIVITY1::END"
        trkFile = 'another trk file'
        return trkFile
    
    
    def RegisterFibers(trkFile):
        print "  REGISTERFIBERS::START"
        print "reading trk File " + trkFile
        print ">>> performing trkFile registration"
        trkFileRegistered = '/tmp/tracksRegistered.trk'
        print "  REGISTERFIBERS::END"
        return trkFileRegistered
    
    
    def test():
        ConnectivityNode = pe.Node(name='connectivity', interface=Function(function=Connectivity, input_names=['dtiVolume'], output_names=['trkFile']))
        ConnectivityNode.inputs.dtiVolume = 'safsafa'
        RegisterFibersNode = pe.Node(name='registerFibers', interface=Function(function=RegisterFibers, input_names=['trkFile'], output_names=['trkFileRegistered']))
    
        pipeline = pe.Workflow(name='testWf')
        pipeline.connect(ConnectivityNode, 'trkFile', RegisterFibersNode, 'trkFile')
        pipeline.run()
    

    Basically you did not connect the two nodes together and you were trying to set inputs as a parameter of the run() method instead of setting them at the node level. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying out Hudson to replace our current Buildbot setup. I installed the git
I'm trying to replace a Silverlight 2-era third-party menubar control in our Silverlight application
Hey, this is my first post on stackoverflow. I'm trying to replace é with
I'm trying to A/B test our product drop view. below is the javascript code
When trying to replace the content of an XML file in C#.NET with a
I'm trying to replace each , in the current file by a new line:
I'm trying to replace the programs that run from my startup directory with a
I'm trying to replace every multiline import inside a Python source file.. So, the
I am trying to replace multiple rows in an Access database to follow a
I am trying to replace a two letter state abbreviation with text then the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.