Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad version check for NiftyReg #3268

Open
wmallo opened this issue Nov 9, 2020 · 4 comments
Open

Bad version check for NiftyReg #3268

wmallo opened this issue Nov 9, 2020 · 4 comments
Labels

Comments

@wmallo
Copy link

wmallo commented Nov 9, 2020

Summary

OS: Mac 10.15.6
After having installed Nipype 1.5.1 and compiled NiftyReg 1.3.9 it does not work producing an error message

Actual behavior

`(base) x@xxs-iMac Desktop % python test.py
Traceback (most recent call last):
File "test.py", line 21, in
aladin = niftyreg.RegAladin()
File "/Users/x/miniconda3/lib/python3.8/site-packages/nipype/interfaces/niftyreg/base.py", line 66, in init
_version = self.version
File "/Users/x/miniconda3/lib/python3.8/site-packages/nipype/interfaces/niftyreg/base.py", line 117, in version
return Info.version()
File "/Users/x/miniconda3/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 1119, in version
clout = CommandLine(
File "/Users/x/miniconda3/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 419, in run
runtime = self._run_interface(runtime)
File "/Users/x/miniconda3/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 814, in _run_interface
self.raise_exception(runtime)
File "/Users/x/miniconda3/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 741, in raise_exception
raise RuntimeError(
RuntimeError: Command:
reg_aladin --version
Standard output:

Standard error:
Err: Parameter --version unknown.

reg_aladin
Usage: reg_aladin -ref -flo [OPTIONS].
See the help for more details (-h).

Return code: 1`

How to replicate the behavior

Created a test.py with the following lines

import os
import shutil
from pathlib import Path
from tkinter import Tk
from tkinter.filedialog import askopenfilename
from nipype.interfaces import niftyreg
from nipype import Node, Workflow
import nipype.interfaces.io as nio  # Data i/o
import nipype.interfaces.spm as spm  # the spm interfaces
import nipype.interfaces.spm.utils as spmu
import nipype.pipeline.engine as pe  # the workflow and node wrappers
import nibabel as nib
import nilearn as nl
import numpy as np
from nipype.interfaces.matlab import MatlabCommand
import nipype.algorithms.modelgen as model  # model specification
from nipype.interfaces.base import Bunch


from nipype.interfaces import niftyreg
aladin = niftyreg.RegAladin()

Script/Workflow details

Please put URL to code or code here (if not too long).

Platform details:

{'commit_hash': '%h',
 'commit_source': 'archive substitution',
 'networkx_version': '2.5',
 'nibabel_version': '3.2.0',
 'nipype_version': '1.5.1',
 'numpy_version': '1.19.4',
 'pkg_path': '/Users/x/miniconda3/lib/python3.8/site-packages/nipype',
 'scipy_version': '1.4.1',
 'sys_executable': '/Users/x/miniconda3/bin/python',
 'sys_platform': 'darwin',
 'sys_version': '3.8.3 (default, May 19 2020, 13:54:14) \n[Clang 10.0.0 ]',
 'traits_version': '6.1.1'}

Execution environment

  • My python environment inside container [Base Tag: ???]
@effigies
Copy link
Member

Sorry for being a bit slow to get to this. It looks like we have an unreliable way to determine the version of NiftyReg. If you know how to get it from a NiftyReg installation, the fix should be pretty easy.

@effigies effigies added this to the 1.6.0 milestone Nov 21, 2020
@effigies effigies changed the title Err: Parameter --version unknown. Bad version check for NiftyReg Nov 24, 2020
@effigies effigies added the bug label Nov 24, 2020
@effigies effigies mentioned this issue Nov 24, 2020
11 tasks
@effigies
Copy link
Member

Installed niftyreg. Seems there is no version information in the binaries or source.

@fepegar Looks like you added this check in #3194. Were you using a source besides sourceforge to build?
@byvernault @mmodat Any thoughts here? There's a minimum version of 1.5.30, but the latest I can find is 1.3.9.

@fepegar
Copy link
Contributor

fepegar commented Nov 28, 2020

Hi, @effigies. I use the maintained code in https://github.com/KCL-BMEIS/niftyreg. This is what I typically use to install it: https://gist.github.com/fepegar/b9a4c7b95a88f552c72e88a6e89e6639

In my computer:

$ reg_aladin --version
1.5.68

@effigies
Copy link
Member

Ah, thanks. I suppose it would be nice if Sourceforge forwarded people to this repository. I suspect @wmallo also installed from SourceForge.

I no longer consider this issue blocking for release, but I think we should probably detect this case and declare the version 1.3.9 so a better error message can be generated.

@effigies effigies removed this from the 1.6.0 milestone Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants