Skip to content

Error with spm.Smooth on Windows (TypeError: environment can only contain strings) #3257

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

Closed
JohannesWiesner opened this issue Oct 6, 2020 · 1 comment

Comments

@JohannesWiesner
Copy link

Summary

I am running into the following error when attempting to use spm.Smooth() on Windows 10 using a bare-metal installation.

Actual behavior

Traceback (most recent call last):

  File "<ipython-input-1-90c4b46891bb>", line 11, in <module>
    smooth.run()

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 375, in run
    self._check_version_requirements(self.inputs)

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 275, in _check_version_requirements
    if names and self.version:

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\spm\base.py", line 358, in version
    info_dict = Info.getinfo(

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\spm\base.py", line 227, in getinfo
    out = mlab.run()

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 419, in run
    runtime = self._run_interface(runtime)

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\matlab.py", line 170, in _run_interface
    runtime = super(MatlabCommand, self)._run_interface(runtime)

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\interfaces\base\core.py", line 812, in _run_interface
    runtime = run_command(runtime, output=self.terminal_output)

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\nipype\utils\subprocess.py", line 103, in run_command
    proc = Popen(

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 105, in __init__
    super(SubprocessPopen, self).__init__(*args, **kwargs)

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,

  File "C:\Users\Johannes.Wiesner\.conda\envs\csp\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

TypeError: environment can only contain strings

Expected behavior

No error.

How to replicate the behavior

Probably (?) setting up a bare metal installation with Windows 10, MATLAB R2020a, SPM12 & nipype

Script/Workflow details

import nipype.interfaces.spm as spm
smooth = spm.Smooth()
smooth.inputs.in_files = "C:/Users/Johannes.Wiesner/Documents/test_scripts/mwp1sub-A00036142_ses-20050101_acq-mprage_run-01_T1w.nii"
smooth.inputs.fwhm = [4, 4, 4]
smooth.run() 

Platform details:

{'commit_hash': '%h',
 'commit_source': 'archive substitution',
 'networkx_version': '2.4',
 'nibabel_version': '3.1.1',
 'nipype_version': '1.5.1',
 'numpy_version': '1.18.5',
 'pkg_path': 'C:\\Users\\Johannes.Wiesner\\.conda\\envs\\csp\\lib\\site-packages\\nipype',
 'scipy_version': '1.5.0',
 'sys_executable': 'C:\\Users\\Johannes.Wiesner\\.conda\\envs\\csp\\python.exe',
 'sys_platform': 'win32',
 'sys_version': '3.8.3 (default, Jul  2 2020, 17:30:36) [MSC v.1916 64 bit '
                '(AMD64)]',
 'traits_version': '6.1.0'}

Execution environment

  • My python environment outside container

This issue is much likely to be related to #2958 and #2509

@effigies
Copy link
Member

Thanks. Closing as a duplicate of #2509 and will be aiming to resolve it in the next release. Please follow that discussion. If you have the time to test the proposed fix, that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants