0

Hey i am runing the following piece of code:

import nipype.interfaces.spm as spm

realign = spm.Realign()

And getting the following error:

    raise IOError("This docstring was not generated by Nipype!\n") from e
OSError: This docstring was not generated by Nipype!

After debugging: My code: spm.Realign() When this runs it uses matlab to run the follwing (base.py lines 217):

mlab.inputs.script = """
                  if isempty(which('spm')),
                  throw(MException('SPMCheck:NotFound','SPM not in matlab path'));
                  end;
                  spm_path = spm('dir');
                  [name, version] = spm('ver');
                  fprintf(1, 'NIPYPE path:%s|name:%s|release:%s', spm_path, name, version);
                  exit;
"""
try:
    out = mlab.run()

I run it in Matlab and got :

>> isempty(which('spm'))
        
        ans =
        
          logical
        
           0
        
>> [name, version] = spm('ver');
fprintf(1, 'NIPYPE path:%s|name:%s|release:%s', spm_path, name, version);
      NIPYPE path:C:\Program Files\MATLAB\R2022b\toolbox\spm12\spm12|name:SPM12|release:7771

so as you can see I have result from this script, but when checking the "out" variable here (line 239):

 out = sd._strip_header(out.runtime.stdout)

Stdout is "" empty string

So I think the problem is Somehow related to the answer of the script from Matlab, how to fix it ?? Thanks!

greenity
  • 419
  • 1
  • 5
  • 13

0 Answers0