Skip to content

Commit a9aa413

Browse files
authored
[FIX] TypeError from 'v' of ANTs version string
Building ANTs from source code, actually the recommended procedure, leads to a version string with a leading `v` that causes the `TypeError`. This little fix may solve #3427
1 parent cd4c34d commit a9aa413

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nipype/interfaces/ants/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ def parse_version(raw_info):
4242

4343
# -githash may or may not be appended
4444
v_string = v_string.split("-")[0]
45+
# if there is a 'v' at the beginning, it may be stripped
46+
v_string = v_string.lstrip('v')
47+
4548

4649
# 2.2.0-equivalent version string
4750
if "post" in v_string and LooseVersion(v_string) >= LooseVersion(

0 commit comments

Comments
 (0)