Repository: nipy/nipype

Issue:
Nipype installation test failure 
### Summary
Hi all,
I installed nipype step by step based on the nipype guide without any error in installation process, but when I tested the system by nipype.test() I encounered: FAILED (SKIP=77, errors=5, failures=3)

### Actual behavior
======================================================================
ERROR: Failure: InterpolationSyntaxError ('%' must be followed by '%' or '(', found: '%h')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/tests/test_utils.py", line 342, in test_provenance
    psg = write_workflow_prov(eg, prov_base, format='all')
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/utils.py", line 1270, in write_workflow_prov
    prov_doc = ProvStore().add_results(result)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/utils/provenance.py", line 376, in add_results
    for key, value in list(get_info().items()):
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/__init__.py", line 60, in <lambda>
    get_info = lambda: _get_pkg_info(os.path.dirname(__file__))
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pkg_info.py", line 82, in get_pkg_info
    src, hsh = pkg_commit_hash(pkg_path)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pkg_info.py", line 52, in pkg_commit_hash
    archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 797, in get
    d)
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 393, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 443, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%h'

======================================================================
ERROR: Failure: InterpolationSyntaxError ('%' must be followed by '%' or '(', found: '%h')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/utils/tests/test_provenance.py", line 18, in test_provenance
    ps.add_results(results)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/utils/provenance.py", line 376, in add_results
    for key, value in list(get_info().items()):
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/__init__.py", line 60, in <lambda>
    get_info = lambda: _get_pkg_info(os.path.dirname(__file__))
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pkg_info.py", line 82, in get_pkg_info
    src, hsh = pkg_commit_hash(pkg_path)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pkg_info.py", line 52, in pkg_commit_hash
    archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 797, in get
    d)
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 393, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 443, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%h'

======================================================================
ERROR: Failure: InterpolationSyntaxError ('%' must be followed by '%' or '(', found: '%h')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/utils/tests/test_provenance.py", line 32, in test_provenance_exists
    CommandLine('echo hello').run()
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1054, in run
    prov_record = write_provenance(results)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/utils/provenance.py", line 244, in write_provenance
    ps.add_results(results)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/utils/provenance.py", line 376, in add_results
    for key, value in list(get_info().items()):
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/__init__.py", line 60, in <lambda>
    get_info = lambda: _get_pkg_info(os.path.dirname(__file__))
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pkg_info.py", line 82, in get_pkg_info
    src, hsh = pkg_commit_hash(pkg_path)
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pkg_info.py", line 52, in pkg_commit_hash
    archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 797, in get
    d)
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 393, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/home/rahman/anaconda3/lib/python3.6/configparser.py", line 443, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%h'

======================================================================
FAIL: Doctest: nipype.interfaces.bru2nii.Bru2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rahman/anaconda3/lib/python3.6/doctest.py", line 2199, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for nipype.interfaces.bru2nii.Bru2
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/bru2nii.py", line 26, in Bru2

----------------------------------------------------------------------
File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/bru2nii.py", line 34, in nipype.interfaces.bru2nii.Bru2
Failed example:
    converter.inputs.input_dir = "brukerdir"
Exception raised:
    Traceback (most recent call last):
      File "/home/rahman/anaconda3/lib/python3.6/doctest.py", line 1330, in __run
        compileflags, 1), test.globs)
      File "<doctest nipype.interfaces.bru2nii.Bru2[2]>", line 1, in <module>
        converter.inputs.input_dir = "brukerdir"
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/traits_extension.py", line 169, in validate
        self.error(object, name, value)
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 172, in error
        value )
    traits.trait_errors.TraitError: The 'input_dir' trait of a Bru2InputSpec instance must be an existing directory name, but a value of 'brukerdir' <class 'str'> was specified.
----------------------------------------------------------------------
File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/bru2nii.py", line 35, in nipype.interfaces.bru2nii.Bru2
Failed example:
    converter.cmdline  # doctest: +ELLIPSIS
Exception raised:
    Traceback (most recent call last):
      File "/home/rahman/anaconda3/lib/python3.6/doctest.py", line 1330, in __run
        compileflags, 1), test.globs)
      File "<doctest nipype.interfaces.bru2nii.Bru2[3]>", line 1, in <module>
        converter.cmdline  # doctest: +ELLIPSIS
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1608, in cmdline
        self._check_mandatory_inputs()
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base.py", line 940, in _check_mandatory_inputs
        raise ValueError(msg)
    ValueError: Bru2 requires a value for input 'input_dir'. For a list of required inputs, see Bru2.help()


======================================================================
FAIL: Doctest: nipype.pipeline.engine.nodes.MapNode
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rahman/anaconda3/lib/python3.6/doctest.py", line 2199, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for nipype.pipeline.engine.nodes.MapNode
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 992, in MapNode

----------------------------------------------------------------------
File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 1001, in nipype.pipeline.engine.nodes.MapNode
Failed example:
    realign.inputs.in_file = ['functional.nii',
                              'functional2.nii',
                              'functional3.nii']
Exception raised:
    Traceback (most recent call last):
      File "/home/rahman/anaconda3/lib/python3.6/doctest.py", line 1330, in __run
        compileflags, 1), test.globs)
      File "<doctest nipype.pipeline.engine.nodes.MapNode[3]>", line 3, in <module>
        'functional3.nii']
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1976, in validate
        value = super(MultiPath, self).validate(object, name, newvalue)
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_types.py", line 2336, in validate
        return TraitListObject( self, object, name, value )
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 2313, in __init__
        raise excp
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 2305, in __init__
        value = [ validate( object, name, val ) for val in value ]
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 2305, in <listcomp>
        value = [ validate( object, name, val ) for val in value ]
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/traits_extension.py", line 80, in validate
        self.error(object, name, value)
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 172, in error
        value )
    traits.trait_errors.TraitError: Each element of the 'in_file' trait of a DynamicTraitedSpec instance must be an existing file name, but a value of 'functional.nii' <class 'str'> was specified.


======================================================================
FAIL: Doctest: nipype.pipeline.engine.nodes.Node
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rahman/anaconda3/lib/python3.6/doctest.py", line 2199, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for nipype.pipeline.engine.nodes.Node
  File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 77, in Node

----------------------------------------------------------------------
File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 92, in nipype.pipeline.engine.nodes.Node
Failed example:
    realign.inputs.in_files = 'functional.nii'
Exception raised:
    Traceback (most recent call last):
      File "/home/rahman/anaconda3/lib/python3.6/doctest.py", line 1330, in __run
        compileflags, 1), test.globs)
      File "<doctest nipype.pipeline.engine.nodes.Node[3]>", line 1, in <module>
        realign.inputs.in_files = 'functional.nii'
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1976, in validate
        value = super(MultiPath, self).validate(object, name, newvalue)
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_types.py", line 2336, in validate
        return TraitListObject( self, object, name, value )
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 2313, in __init__
        raise excp
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 2305, in __init__
        value = [ validate( object, name, val ) for val in value ]
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 2305, in <listcomp>
        value = [ validate( object, name, val ) for val in value ]
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 1983, in validate
        return self.slow_validate( object, name, value )
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 1991, in slow_validate
        self.error( object, name, value )
      File "/home/rahman/anaconda3/lib/python3.6/site-packages/traits/trait_handlers.py", line 172, in error
        value )
    traits.trait_errors.TraitError: Each element of the 'in_files' trait of a RealignInputSpec instance must be a list of items which are an existing file name or an existing file name, but a value of 'functional.nii' <class 'str'> was specified.

----------------------------------------------------------------------
Ran 16127 tests in 245.019s
FAILED (SKIP=77, errors=5, failures=3)
Process finished with exit code 0

### Expected behavior
I expected to receive an OK, errors=0 and failures=0

### How to replicate the behavior
import nipype
nipype.test()

### Platform details:
Can not get output from: `python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"`




Discussion:
Did you take the latest version of nipype from the repo? It looks like the test are run by `nose` and we switched to `pytest` some months ago.
@rattar1989 There are a couple things to check/do here:

- 1) Could you try removing and then reinstalling configparser? This `InterpolationSyntaxError` is generally caused with that.
- 2) As @djarecka mentioned, try installing the master branch. There have been some fixes to `nipype.test()` that haven't been released yet.
- 3) Is your `traits` package updated?
@djarecka thanks for the reply.
- I updated nipype by: pip install --upgrade nipype

- Sorry, I don't know how to switch between nose &  pytest. I only followed the instructions given in the NipypeBeginnersGuide. 

@mgxd thanks for the reply.
- how can I remove/install ->  InterpolationSyntaxError
- master branch?
- yes, I did: conda update traits

I again installed nipype on a new system following the Nipype Beginner’s Guide, Release 1.0, but I still have the same errors and fails! 
Is this the [Guide](https://github.com/miykael/nipype-beginner-s-guide/blob/master/NipypeBeginnersGuide.pdf)? I will look at it and try to follow the instruction from chapter 4. 
What system do you have? 
- Yes, that's the guide I used.
Thanks so much. It's about a week that I'm dealing with it but no success yet.
- Ubuntu 16.04.2
Any comments/advice to get rid of these fails and errors? 

I'm gonna run my own pipeline/workflow to analyze Cardiac CT/MR images. The current version of my code is written in matlab (also using many C/C++ codes/functions). 

Can I continue to construct my pipeline with python using nipype with the existing errors? 
@rattar1989 - in general you should be ok, but i like clean installs. 

out of curiosity does this not work?

http://nipype.readthedocs.io/en/latest/users/install.html#using-conda

we may need to ask miykael to update the beginners guide.
Thanks for the note. I just did this:
`~$ conda search nipype --channel conda-forge`

Fetching package metadata .........
nipype                  0.12.0                             0  conda-forge     
                             0.12.0                   py35_0  conda-forge     
                             0.12.0                   py27_1  conda-forge     
                             0.12.0                   py34_1  conda-forge     
                             0.12.0                   py35_1  conda-forge     
                             0.12.1                   py27_0  conda-forge     
                             0.12.1                   py34_0  conda-forge     
                             0.12.1                   py35_0  conda-forge     
                             0.12.1                   py36_0  conda-forge     
                             0.12.1                   py27_1  conda-forge     
                             0.12.1                   py35_1  conda-forge     
                          *  0.12.1                   py36_1  conda-forge   

And then:
`~$ pip install nipype[all]`

Requirement already satisfied: nipype[all] in ./anaconda3/lib/python3.6/site-packages
  nipype 0.12.1 does not provide the extra 'all'

any idea? 


It should be `conda install nipype`. Note that this will install the previous release. However that should be fine for your needs at this point. We will be releasing the next version tomorrow.
@rattar1989 - I just want to let you know that I did try to install and run tests on Ubuntu 16.04 and I also had problems with a few tests. Since the new version is going to be release, I won't debug the problems with the old version now. Hope the new version will work for you without any problems.
@djarecka @satra , thanks for your comments. Is the new version released? how can I update/upgrade my nipype already installed on my machine?

(I updated nipype by `conda install nipype` but still have the same fails and errors; seems the new version is not released yet?)

You're right, `conda install nipype` still installs the older version of nipype, 0.12.1. You can confirm this in Python 

```
import nipype
nipype.__version__
```

The new version is coming. If you can't or don't want to wait for the new release, you can still try to run your code using the 0.12.1 version. Is very likely that the few tests which are failing in your case have nothing in common with your pipeline. 

You can also install a [developer version](http://nipype.readthedocs.io/en/latest/devel/testing_nipype.html), but keep in mind that this is currently being updated and tested before the new release. I've just tested with Ubuntu 16.04 and I can see a Unicode issue in one test. Again, it's likely that your pipeline will not be affected, but you might want to wait for a new release and user installation. 




@djarecka I appreciate your help for clarifying this.
So I continue to construct my own pipeline... 

@djarecka - just a side note that the unicode test issues will occur if you use docker without setting:

```
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
```
thanks @satra ! Now  all test from the developer version pass in my Ubuntu 16:04 container.
Just to make sure that I'm in a right path: 
I'm not using docker. I installed nipype.
From now on I'm going to construct my pipeline for Cardiac MR/CT image analysis (using different functions from C++ and Matlab) in pyhton (by PyCharm IDE) using nipype.
(I still have the fails/errors mentioned earlier but based on your suggestions I feel this would not cause problem... Hopefully) 

don't worry about docker. I simply don't have Ubuntu and wanted to test the installation on an environment that is similar to yours, so I used the Ubuntu container.
sorry if I have missed somewhere above already stated resolution to the "InterpolationSyntaxError" issue.  The reason is that '%h' in nipype/COMMIT_INFO.txt can be not replaced... I didn't do checks why it is not, although seems listed in .gitattributes, but I have downloaded nipype's .zip from github and there it wasn't replaced so py.tests fails if I just run `py.test -s -v nipype/utils/tests/test_provenance.py::test_provenance_exists`.  Workaround (at least for that test) is to replace '%h' with a real hash or just a random string
@yarikoptic - does this happen when you install using `pip install nipype`?
I had to reinstall everything on a new system, I then tried to run `nipype.test()`.
I get the following errors now:
any suggestion?

=================================== FAILURES ===================================
_______________________________ test_provenance ________________________________

tmpdir = local('/tmp/pytest-of-rahman/pytest-5/test_provenance0')

    def test_provenance(tmpdir):
        out_dir = str(tmpdir)
        metawf = pe.Workflow(name='meta')
        metawf.base_dir = out_dir
        metawf.add_nodes([create_wf('wf%d' % i) for i in range(1)])
        eg = metawf.run(plugin='Linear')
        prov_base = os.path.join(out_dir,
                                 'workflow_provenance_test')
>       psg = write_workflow_prov(eg, prov_base, format='all')

/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/tests/test_utils.py:337: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/utils.py:1275: in write_workflow_prov
    prov_doc = ProvStore().add_results(result)
/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/utils/provenance.py:416: in add_results
    for key, value in list(get_info().items()):
/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/__init__.py:47: in get_info
    return _get_pkg_info(os.path.dirname(__file__))
/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/pkg_info.py:88: in get_pkg_info
    src, hsh = pkg_commit_hash(pkg_path)
/home/rahman/anaconda2/lib/python2.7/site-packages/nipype/pkg_info.py:56: in pkg_commit_hash
    archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
/home/rahman/anaconda2/lib/python2.7/site-packages/backports/configparser/__init__.py:811: in get
    d)
/home/rahman/anaconda2/lib/python2.7/site-packages/backports/configparser/__init__.py:384: in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <backports.configparser.BasicInterpolation object at 0x7f9166037b10>
parser = <backports.configparser.ConfigParser object at 0x7f914064bc10>
option = 'archive_subst_hash', accum = [], rest = '%h', section = 'commit hash'
map = _ChainMap({}, OrderedDict([(u'archive_subst_hash', u'%h'), (u'install_hash', u'7178a9a')]), OrderedDict())
depth = 1

    def _interpolate_some(self, parser, option, accum, rest, section, map,
                          depth):
        rawval = parser.get(section, option, raw=True, fallback=rest)
        if depth > MAX_INTERPOLATION_DEPTH:
            raise InterpolationDepthError(option, section, rawval)
        while rest:
            p = rest.find("%")
            if p < 0:
                accum.append(rest)
                return
            if p > 0:
                accum.append(rest[:p])
                rest = rest[p:]
            # p is no longer used
            c = rest[1:2]
            if c == "%":
                accum.append("%")
                rest = rest[2:]
            elif c == "(":
                m = self._KEYCRE.match(rest)
                if m is None:
                    raise InterpolationSyntaxError(option, section,
                        "bad interpolation variable reference %r" % rest)
                var = parser.optionxform(m.group(1))
                rest = rest[m.end():]
                try:
                    v = map[var]
                except KeyError:
                    raise from_none(InterpolationMissingOptionError(
                        option, section, rawval, var))
                if "%" in v:
                    self._interpolate_some(parser, option, accum, v,
                                           section, map, depth + 1)
                else:
                    accum.append(v)
            else:
                raise InterpolationSyntaxError(
                    option, section,
                    "'%%' must be followed by '%%' or '(', "
>                   "found: %r" % (rest,))
E               InterpolationSyntaxError: '%' must be followed by '%' or '(', found: u'%h'

/home/rahman/anaconda2/lib/python2.7/site-packages/backports/configparser/__init__.py:434: InterpolationSyntaxError
----------------------------- Captured stdout call -----------------------------
170526-15:43:04,439 workflow INFO:
	 Workflow meta settings: ['check', 'execution', 'logging']
170526-15:43:04,443 workflow INFO:
	 Running serially.
170526-15:43:04,443 workflow INFO:
	 Executing node proc.bI.b0 in dir: /tmp/pytest-of-rahman/pytest-5/test_provenance0/meta/wf0/_fwhm_0/proc
170526-15:43:04,456 workflow INFO:
	 Executing node proc2.aI.a0.b0 in dir: /tmp/pytest-of-rahman/pytest-5/test_provenance0/meta/wf0/_fwhm_0/_fwhm_0/proc2
!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
======= 1 failed, 2314 passed, 207 skipped, 5 xfailed in 242.85 seconds ========



@rattar1989 are you still running into this error?
@mgxd yes, I always have had this error. 
But I have used the Nipype and have had no problem in my code. 
I have the same error: InterpolationSyntaxError: '%' must be followed by '%' or '(', found: u'%h'
@pjmark how did you install your configuration? Can you try installing the master branch with pip?
oh, yes, with pip it did indeed work.  thanks!

Resolving patch:
diff --git a/nipype/pkg_info.py b/nipype/pkg_info.py
--- a/nipype/pkg_info.py
+++ b/nipype/pkg_info.py
@@ -3,14 +3,13 @@
 
 from future import standard_library
 standard_library.install_aliases()
+from builtins import open
 import configparser
 
 import os
 import sys
 import subprocess
 
-from .info import VERSION
-
 COMMIT_INFO_FNAME = 'COMMIT_INFO.txt'
 PY3 = sys.version_info[0] >= 3
 
@@ -52,7 +51,8 @@ def pkg_commit_hash(pkg_path):
         cfg_parser = configparser.RawConfigParser()
     else:
         cfg_parser = configparser.ConfigParser()
-    cfg_parser.read(pth)
+    with open(pth, encoding='utf-8') as fp:
+        cfg_parser.readfp(fp)
     archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
     if not archive_subst.startswith('$Format'):  # it has been substituted
         return 'archive substitution', archive_subst
@@ -86,6 +86,9 @@ def get_pkg_info(pkg_path):
        with named parameters of interest
     '''
     src, hsh = pkg_commit_hash(pkg_path)
+    from .info import VERSION
+    if not PY3:
+        src, hsh, VERSION = src.encode(), hsh.encode(), VERSION.encode()
     import networkx
     import nibabel
     import numpy


Test patch: