nipy/nipype — Issue #246: mapnode error message when one of the inputs is missing 
Author: satra
Created: 2011-10-12 00:17:38+00:00
State: open
Labels: bug

num_subnodes should check for input existence before returning length.

```
File "/software/python/EPD/virtualenvs/7.1/nipype0.4/lib/python2.7/site-packages/nipype/pipeline/engine.py", line 468, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/software/python/EPD/virtualenvs/7.1/nipype0.4/lib/python2.7/site-packages/nipype/pipeline/plugins/base.py", line 159, in run
self._send_procs_to_workers(updatehash=updatehash)
File "/software/python/EPD/virtualenvs/7.1/nipype0.4/lib/python2.7/site-packages/nipype/pipeline/plugins/base.py", line 229, in _send_procs_to_workers
self.procs[jobid].num_subnodes()>1:
File "/software/python/EPD/virtualenvs/7.1/nipype0.4/lib/python2.7/site-packages/nipype/pipeline/engine.py", line 1615, in num_subnodes
return len(filename_to_list(getattr(self.inputs, self.iterfield[0])))
TypeError: object of type 'NoneType' has no len()
```