FCP-INDI / cpac

A convenience wrapper for https://github.com/FCP-INDI/C-PAC that provides a simple command line interface.
https://fcp-indi.github.io/docs/latest/user/cpac
MIT License
4 stars 3 forks source link

šŸ› Running a minimal config doesn't work with the wrapper #17

Closed shnizzedy closed 2 years ago

shnizzedy commented 2 years ago

Describe the bug

Traceback (most recent call last):
  File "/home/jclucas/miniconda3/bin/cpac", line 8, in <module>
    sys.exit(run())
  File "/home/jclucas/miniconda3/lib/python3.7/site-packages/cpac/__main__.py", line 397, in run
    main(parsed)
  File "/home/jclucas/miniconda3/lib/python3.7/site-packages/cpac/__main__.py", line 307, in main
    Backends(**arg_vars).run(
  File "/home/jclucas/miniconda3/lib/python3.7/site-packages/cpac/backends/__init__.py", line 27, in Backends
    }[platform](**kwargs)
  File "/home/jclucas/miniconda3/lib/python3.7/site-packages/cpac/backends/singularity.py", line 30, in __init__
    kwargs = self.collect_config_bindings(self.config, **kwargs)
  File "/home/jclucas/miniconda3/lib/python3.7/site-packages/cpac/backends/platform.py", line 116, in collect_config_bindings
    inner_binding = self._collect_config_binding(config, c_b[0])
  File "/home/jclucas/miniconda3/lib/python3.7/site-packages/cpac/backends/platform.py", line 96, in _collect_config_binding
    return config.get('pipeline_setup', {}).get(config_key, {}).get('path')
AttributeError: 'list' object has no attribute 'get'

To reproduce

  1. Create or acquire a minimal C-PAC pipeline config (one that begins with FROM:)
  2. Run cpac $WRAPPER_OPTIONS run $BIDS_DIR $OUTPUT_DIR participant --pipeline_file $MINIMAL_CONFIG
  3. See error

Expected behavior

cpac would pass the minimal config to C-PAC which would run normally.

Acceptance criteria

C-PAC version

v1.8.1-dev

Container platform

Docker, Singularity