# Cwltool --pack "invalid field inputBinding"

**URL:** <https://cwl.discourse.group/t/cwltool-pack-invalid-field-inputbinding/358>\
**Category:** CWL Questions\
**Created:** [May 24, 2021, 5:43pm UTC](https://cwl.discourse.group/t/cwltool-pack-invalid-field-inputbinding/358 "2021-05-24T17:43:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ionox0](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/ionox0/32/18_2.png) [@ionox0](https://cwl.discourse.group/u/ionox0)\
**Post date:** [May 24, 2021, 5:43pm UTC](https://cwl.discourse.group/t/cwltool-pack-invalid-field-inputbinding/358/1 "2021-05-24T17:43:36Z")

</div>

After using the `cwltool --pack` command we are receiving an error related to an invalid field in one of the inputs.

I believe this may be an issue with the json representation of the workflow, as before packing, the workflow runs successfully with YAML. I do see that `inputBinding` is a valid field for `inputArraySchema`, so I’m not sure why this error would be raised: [Common Workflow Language (CWL) Workflow Description, v1.0.2](https://www.commonwl.org/v1.0/Workflow.html#InputArraySchema)

Here is the full error:

```auto
ERROR Tool definition failed initialization:
Tool definition file:///Users/johnsoni/Desktop/code/msk_access/nucleo/nucleo__packed.cwl#base_quality_recalibration.cwl failed validation:
nucleo __packed.cwl:9684:9: Object `nucleo__ packed.cwl#base_quality_recalibration.cwl` is not valid
                              because
                                tried `Workflow` but
nucleo__packed.cwl:9688:13: the `inputs` field is not valid because
nucleo__packed.cwl:9708:17: item is invalid because
nucleo__packed.cwl:9710:21: the `type` field is not valid because
                                        tried array of <CWLType or InputRecordSchema or
                                        InputEnumSchema or InputArraySchema or string> but
                                          item is invalid because
                                            - tried InputRecordSchema but
nucleo__packed.cwl:9713:29: * the `type` field is not valid because
                                                the value 'array' is not a valid
                                                enum_d9cba076fca539106791a4f46d198c7fcfbdb779, expected 'record'
nucleo__packed.cwl:9714:29: * invalid field `items`, expected one of: 'fields',
                                              'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9715:29: * invalid field `inputBinding`, expected one of:
                                              'fields', 'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9710:21: - tried InputEnumSchema but
                                              * missing required field `symbols`
nucleo__packed.cwl:9713:29: * the `type` field is not valid because
                                                the value 'array' is not a valid
                                                enum_d961d79c225752b9fadb617367615ab176b47d77, expected 'enum'
nucleo__packed.cwl:9714:29: * invalid field `items`, expected one of: 'symbols',
                                              'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9715:29: * invalid field `inputBinding`, expected one of:
                                              'symbols', 'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9710:21: - tried InputArraySchema but
nucleo__packed.cwl:9715:29: invalid field `inputBinding`, expected one of: 'items',
                                              'type', 'label', 'doc', 'name'

```

And the relevant section of the packed workflow:

```auto
  9684 {
  9685 "class": "Workflow",
  9686 "id": "#base_quality_recalibration.cwl",
  9687 "label": "base_quality_recalibration",
  9688 "inputs": [
...
  9708 {
  9709 "id": "#base_quality_recalibration.cwl/read_filter",
  9710 "type": [
  9711 "null",
  9712 {
  9713 "type": "array",
  9714 "items": "string",
  9715 "inputBinding": {
  9716 "prefix": "--read-filter"
  9717 }
  9718 }
  9719 ],
  9720 "https://www.sevenbridges.com/x": 0,
  9721 "https://www.sevenbridges.com/y": 213.375
  9722 },

```

---

<div class="post-metadata">

**Author:** ![alexiswl](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/alexiswl/32/93_2.png) [@alexiswl](https://cwl.discourse.group/u/alexiswl)\
**Post date:** [June 1, 2021, 6:55am UTC](https://cwl.discourse.group/t/cwltool-pack-invalid-field-inputbinding/358/2 "2021-06-01T06:55:50Z")

</div>

Could you provide the yaml version of the workflow please?

The `inputBinding` is a valid field for `inputArraySchema` in a tool context, but I’m not familiar with using `inputBinding` with workflow inputs.

Alexis

---

<div class="post-metadata">

**Author:** ![ionox0](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/ionox0/32/18_2.png) [@ionox0](https://cwl.discourse.group/u/ionox0)\
**Post date:** [June 2, 2021, 4:06pm UTC](https://cwl.discourse.group/t/cwltool-pack-invalid-field-inputbinding/358/3 "2021-06-02T16:06:45Z")

</div>

Thank you, yes the issue was for some reason having `inputBinding` in the inputs section of a workflow. The CWL is valid after this was removed!
