Skip to content

InterpolationSyntaxError from get_info() #2541

Closed
@djarecka

Description

@djarecka

Summary

getting an error running nipype workflow or simply nipype.get_info (related to #1970)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/dorota/anaconda/envs/nipype_test/lib/python2.7/site-packages/nipype/__init__.py", line 48, in get_info
    return _get_pkg_info(os.path.dirname(__file__))
  File "/Users/dorota/anaconda/envs/nipype_test/lib/python2.7/site-packages/nipype/pkg_info.py", line 92, in get_pkg_info
    src, hsh = pkg_commit_hash(pkg_path)
  File "/Users/dorota/anaconda/envs/nipype_test/lib/python2.7/site-packages/nipype/pkg_info.py", line 58, in pkg_commit_hash
    archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
  File "/Users/dorota/anaconda/envs/nipype_test/lib/python2.7/site-packages/backports/configparser/__init__.py", line 811, in get
    d)
  File "/Users/dorota/anaconda/envs/nipype_test/lib/python2.7/site-packages/backports/configparser/__init__.py", line 384, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/Users/dorota/anaconda/envs/nipype_test/lib/python2.7/site-packages/backports/configparser/__init__.py", line 434, in _interpolate_some
    "found: %r" % (rest,))
backports.configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: u'%h'

How to replicate the behavior

It can be replicated in conda environment (used conda create -n nipype_test python=2 nipype):
python -c "import nipype; nipype.get_info()"

If nipype is installed with pip the error disappears

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions