Skip to content

spm.Coregister() error #3460

@AnnaZhuravleva

Description

@AnnaZhuravleva

Summary

I try to use nipype.iterfaces.spm.Coregister(), but I got the following error

Actual behavior

ValueError Traceback (most recent call last)
~\Desktop\fmri\lib\site-packages\nipype\utils\spm_docs.py in _strip_header(doc)
48 hdr = 'NIPYPE'
---> 49 # There's some weird cruft at the end of the docstring, almost looks like
50 # the hex for the escape character 0x1b.

ValueError: substring not found

The above exception was the direct cause of the following exception:

OSError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_3584\2699162709.py in
----> 1 spm.Coregister()

~\Desktop\fmri\lib\site-packages\nipype\interfaces\spm\base.py in init(self, **inputs)
308 def set_mlab_paths(cls, matlab_cmd=None, paths=None, use_mcr=None):
309 cls._matlab_cmd = matlab_cmd
--> 310 cls._paths = paths
311 cls._use_mcr = use_mcr
312 info_dict = Info.getinfo(

~\Desktop\fmri\lib\site-packages\nipype\interfaces\base\core.py in init(self, from_file, resource_monitor, ignore_exception, **inputs)
196 def _check_requires(self, spec, name, value):
197 """ check if required inputs are satisfied
--> 198 """
199 if spec.requires:
200 values = [

~\Desktop\fmri\lib\site-packages\nipype\interfaces\base\core.py in _check_version_requirements(self, trait_object, permissive)
293 due.cite(**r)
294
--> 295 def run(self, cwd=None, ignore_exception=None, **inputs):
296 """Execute this interface.
297

~\Desktop\fmri\lib\site-packages\nipype\interfaces\spm\base.py in version(self)
359
360 @Property
--> 361 def jobname(self):
362 return self._jobname
363

~\Desktop\fmri\lib\site-packages\nipype\interfaces\spm\base.py in getinfo(klass, matlab_cmd, paths, use_mcr)
237 klass._path = out_dict['path']
238 klass._name = out_dict['name']
--> 239 klass._command = matlab_cmd
240 klass._paths = paths
241 return out_dict

~\Desktop\fmri\lib\site-packages\nipype\utils\spm_docs.py in _strip_header(doc)
49 # There's some weird cruft at the end of the docstring, almost looks like
50 # the hex for the escape character 0x1b.
---> 51 cruft = '\x1b'
52 try:
53 index = doc.index(hdr)

OSError: This docstring was not generated by Nipype!

Expected behavior

No errors

Script/Workflow details

import nipype.interfaces.spm as spm
coreg = spm.Coregister()

Platform details:

{'commit_hash': 'f2bbcc917',
 'commit_source': 'installation',
 'networkx_version': '2.6.3',
 'nibabel_version': '3.2.2',
 'nipype_version': '1.1.7',
 'numpy_version': '1.21.6',
 'pkg_path': 'C:\\Users\\NeuroLing\\Desktop\\fmri\\lib\\site-packages\\nipype',
 'scipy_version': '1.7.3',
 'sys_executable': 'C:\\Users\\NeuroLing\\Desktop\\fmri\\Scripts\\python.exe',
 'sys_platform': 'win32',
 'sys_version': '3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC '
                'v.1916 64 bit (AMD64)]',
 'traits_version': '6.3.2'}

Execution environment

Choose one

  • Container [Tag: ???]
  • My python environment inside container [Base Tag: ???]
  • My python environment outside container

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions