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

freesurfer_home TraitError #3193

Open
omerday opened this issue Dec 24, 2023 · 1 comment
Open

freesurfer_home TraitError #3193

omerday opened this issue Dec 24, 2023 · 1 comment
Labels

Comments

@omerday
Copy link

omerday commented Dec 24, 2023

What happened?

When trying to run fmriprep with the command attached below through my Mac, the following error is returned:

231224-20:01:59,748 nipype.workflow IMPORTANT:
	 Running fMRIPrep version 23.1.4

         License NOTICE ##################################################
         fMRIPrep 23.1.4
         Copyright 2023 The NiPreps Developers.
         
         This product includes software developed by
         the NiPreps Community (https://nipreps.org/).
         
         Portions of this software were developed at the Department of
         Psychology at Stanford University, Stanford, CA, US.
         
         This software is also distributed as a Docker container image.
         The bootstrapping file for the image ("Dockerfile") is licensed
         under the MIT License.
         
         This software may be distributed through an add-on package called
         "Docker Wrapper" that is under the BSD 3-clause License.
         #################################################################
231224-20:01:59,794 nipype.workflow IMPORTANT:
	 Building fMRIPrep's workflow:
           * BIDS dataset path: /Users/omerdayan/Downloads/fMRI.
           * Participant list: ['08'].
           * Run identifier: 20231224-200155_b496551e-dbcd-4e3f-9d9b-1a12dcfbe37b.
           * Output spaces: MNI152NLin2009cAsym:res-native.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /Users/omerdayan/Downloads/fMRI-Output/sourcedata/freesurfer.
Process Process-2:
Traceback (most recent call last):
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/nipype/interfaces/base/traits_extension.py", line 129, in validate
    value = Path(value)  # Use pathlib's validation
            ^^^^^^^^^^^
  File "/Users/omerdayan/anaconda3/lib/python3.11/pathlib.py", line 871, in __new__
    self = cls._from_parts(args)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/omerdayan/anaconda3/lib/python3.11/pathlib.py", line 509, in _from_parts
    drv, root, parts = self._parse_args(args)
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/omerdayan/anaconda3/lib/python3.11/pathlib.py", line 493, in _parse_args
    a = os.fspath(a)
        ^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/omerdayan/anaconda3/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/Users/omerdayan/anaconda3/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/fmriprep/cli/workflow.py", line 115, in build_workflow
    retval["workflow"] = init_fmriprep_wf()
                         ^^^^^^^^^^^^^^^^^^
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/fmriprep/workflows/base.py", line 80, in init_fmriprep_wf
    BIDSFreeSurferDir(
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 563, in __init__
    super(SimpleInterface, self).__init__(
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 202, in __init__
    self.inputs.trait_set(**inputs)
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/traits/has_traits.py", line 1520, in trait_set
    setattr(self, name, value)
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/nipype/interfaces/base/traits_extension.py", line 131, in validate
    self.error(objekt, name, str(value))
  File "/Users/omerdayan/anaconda3/lib/python3.11/site-packages/traits/base_trait_handler.py", line 74, in error
    raise TraitError(
traits.trait_errors.TraitError: The 'freesurfer_home' trait of a _BIDSFreeSurferDirInputSpec instance must be a pathlike object or string representing an existing directory, but a value of 'None' <class 'str'> was specified.

What command did you use?

fmriprep /Users/omerdayan/Downloads/fMRI /Users/omerdayan/Downloads/fMRI-Output participant --participant-label 08 --skip_bids_validation --fs-license-file ./Downloads/license.txt

What version of fMRIPrep are you running?

23.1.4

How are you running fMRIPrep?

Local installation ("bare-metal")

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

No response

Additional information / screenshots

No response

@omerday omerday added the bug label Dec 24, 2023
@effigies
Copy link
Member

Do you have FreeSurfer installed? Is FREESURFER_HOME defined in your environment?

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

2 participants