-
Notifications
You must be signed in to change notification settings - Fork 533
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
With NiPype Memory with version 0.12.1 and >=0.13.0 #2406
Comments
That was a bug. Fixed in #2407. You can still use the interface prior to getting the fix, you just can't print the object directly. If you need it, you can manually edit your file ( |
Thank you @effigies That's very quick. I will try the fix. |
I am printing just to explain the problem. But, the actual problem lies around as I mentioned in this issue at pypreprocess neurospin/pypreprocess#288 |
It was fine with 0.12.1 but not above 0.13.0. |
Okay. That looks like it's probably an issue with |
I tried with this version too. The problem still exists. |
What does the actual input to Realign look like? Is it a list of files, or a list of a list? I can reproduce the error like so: from nipype.interfaces.spm import Realign
realign = Realign()
realign.inputs.in_files = [['test.img']] However, if I use the following, I get no error: realign.inputs.in_files = ['test.img'] |
List of a list. Is it something changed on passing input to Realign between 0.12.1 to 0.13.0 ? |
yes, I cannot see the problem. Thanks a lot. Do you have any suggestion to change the attribute or add an attribute In Realign to get back to the normal behaviour to make it work for versions until this is released ? |
You can create a patched input spec: from nipype.interfaces import spm, base
class PatchedRealignInputSpec(spm.preprocess.RealignInputSpec):
in_files = base.InputMultiPath(
base.InputMultiPath(spm.base.ImageFileSPM(exists=True)),
field='data',
mandatory=True,
copyfile=True,
desc='list of filenames to realign')
class PatchedRealign(spm.preprocess.Realign):
input_spec = PatchedRealignInputSpec I think this will work in any version >=0.13.0. So you may need to wrap it in a version check to make sure you don't try to use |
@effigies - I was just checking your short example and with ver. 0.13 works perfectly fine for me. So it looks like that the problem (at least this one) comes completely from my PR, sorry for this! |
Hi Nipype team,
Summary
Trying to understand what is causing this difference between versions 0.12.1 and >=0.13.0. Is this with Memory or Realign. I am suspecting that this is the problem. But, I am sure I am missing some important details on this ?
We are experiencing this in package pypreprocess which is reliant on Nipype. See full traceback in neurospin/pypreprocess#288
Actual behavior
Expected behavior
How to replicate the behavior
Thanks a lot for your time.
The text was updated successfully, but these errors were encountered: