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

singularity run with pydeface fails due to TraitError from nipype #27

Open
yarikoptic opened this issue Jul 22, 2020 · 1 comment
Open

Comments

@yarikoptic
Copy link
Contributor

~/proj/nuisance/data/dbic-deid$ singularity run --cleanenv  envs/bidsonym_latest.sif sourcedata participant --participant_label=sid000003 --deid pydeface
Making sure the input data is BIDS compliant (warnings can be ignored in most cases).
This dataset appears to be BIDS compatible.

        Summary:                   Available Tasks:        Available Modalities: 
        1115 Files, 11.56MB                                T1w                   
        206 - Subjects                                                           
        370 - Sessions                                                           


	If you have any questions, please post on https://neurostars.org/tags/bids.

200722-09:29:01,828 nipype.utils INFO:
	 Running nipype version 1.5.0-rc1 (latest: 1.5.0)
200722-09:29:02,281 nipype.workflow INFO:
	 Workflow deface_wf settings: ['check', 'execution', 'logging', 'monitoring']
200722-09:29:02,290 nipype.workflow INFO:
	 Running serially.
200722-09:29:02,291 nipype.workflow INFO:
	 [Node] Setting-up "deface_wf.pydeface" in "/tmp/tmpk8cxi8ex/deface_wf/pydeface".
200722-09:29:02,292 nipype.workflow INFO:
	 [Node] Running "pydeface" ("nipype.interfaces.utility.wrappers.Function")
--------------
pydeface 2.0.0
--------------
Temporary files:
  /tmp/tmpi4i7x5mr.mat
  /tmp/tmplev6753o.nii.gz
Defacing...
  sourcedata/sub-sid000003/ses-XXXXXXXXXXX/anat/sub-sid000003_ses-20161011X092931_T1w.nii.gz
200722-09:29:03,153 nipype.utils INFO:
	 Running nipype version 1.5.0-rc1 (latest: 1.5.0)
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/bidsonym/bin/pydeface", line 11, in <module>
    load_entry_point('pydeface==2.0.0', 'console_scripts', 'pydeface')()
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/pydeface-2.0.0-py3.6.egg/pydeface/__main__.py", line 95, in main
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/pydeface-2.0.0-py3.6.egg/pydeface/utils.py", line 99, in deface_image
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
    value = super(File, self).validate(objekt, name, value, return_pathlike=True)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
    self.error(objekt, name, str(value))
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/traits/base_trait_handler.py", line 77, in error
    object, name, self.full_info(object, name, value), value
traits.trait_errors.TraitError: The 'reference' trait of a FLIRTInputSpec instance must be a pathlike object or string representing an existing file, but a value of 'sourcedata/sub-sid000003/ses-XXXXX/anat/sub-sid000003_ses-XXXXXX_T1w.nii.gz' <class 'str'> was specified.
200722-09:29:03,304 nipype.workflow WARNING:
	 Storing result file without outputs
200722-09:29:03,306 nipype.workflow WARNING:
	 [Node] Error on "deface_wf.pydeface" (/tmp/tmpk8cxi8ex/deface_wf/pydeface)
200722-09:29:03,308 nipype.workflow ERROR:
	 Node pydeface failed to run on host smaug.
200722-09:29:03,309 nipype.workflow ERROR:
	 Saving crash info to /home/chrispycheng/proj/nuisance/data/dbic-deid/crash-20200722-092903-chrispycheng-pydeface-7fc94405-bc25-4fda-a538-a5eb543ee23a.pklz
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/plugins/linear.py", line 46, in run
    node.run(updatehash=updatehash)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 397, in run
    runtime = self._run_interface(runtime)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
    out = function_handle(**args)
  File "<string>", line 9, in pydeface_cmd
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pydeface', SENSORED by yarik, '--force']' returned non-zero exit status 1.

200722-09:29:03,310 nipype.workflow INFO:
	 ***********************************
200722-09:29:03,310 nipype.workflow ERROR:
	 could not run node: deface_wf.pydeface
200722-09:29:03,310 nipype.workflow INFO:
	 crashfile: /home/chrispycheng/proj/nuisance/data/dbic-deid/crash-20200722-092903-chrispycheng-pydeface-7fc94405-bc25-4fda-a538-a5eb543ee23a.pklz
200722-09:29:03,310 nipype.workflow INFO:
	 ***********************************
Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/bidsonym/bin/bidsonym", line 11, in <module>
    load_entry_point('bidsonym', 'console_scripts', 'bidsonym')()
  File "/home/bm/bidsonym/run_deeid.py", line 111, in run_deeid
    run_pydeface(T1_file, T1_file)
  File "/home/bm/bidsonym/defacing_algorithms.py", line 32, in run_pydeface
    deface_wf.run()
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/engine/workflows.py", line 632, in run
    runner.run(execgraph, updatehash=updatehash, config=self.config)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/plugins/linear.py", line 70, in run
    report_nodes_not_run(notrun)
  File "/opt/miniconda-latest/envs/bidsonym/lib/python3.6/site-packages/nipype/pipeline/plugins/tools.py", line 98, in report_nodes_not_run
    ("Workflow did not execute cleanly. " "Check log for details")
RuntimeError: Workflow did not execute cleanly. Check log for details

@PeerHerholz
Copy link
Owner

Hm, not entirely sure what's going wrong here. Could you try again with the latest version?

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