common-workflow-language/cwltool

Field is not valid: CommentedSeq expected null or string

jjkoehorst opened this issue · 3 comments

Expected Behavior

When providing a YAML with a list variable to an entry that requires an optional string should throw an error stating that a list was provided and that a null or string was expected.

Actual Behavior

It complains about a CommentedSeq value while its actually a list.

QUALITY.yaml:7:1: the `kraken_database` field is not valid 
because value is a CommentedSeq, expected null or string

Workflow Code

  kraken_database:
    type: string?
    label: Kraken2 database
    doc: Kraken2 database location
    default: "/unlock/references/databases/Kraken2/K2_PlusPF_20210517"

Your Environment

  • cwltool version: INFO /usr/local/bin/cwltool 3.1.20220520101121
mr-c commented

Thanks @jjkoehorst ; I agree this error message could be improved; Here CommentedSeq is a commented sequence, so it was referring to a list, just not in a helpful way.

Ah I was already wondering why it was detecting sequences as in DNA / Sequencing data...

This error message is very obscure, also took me some time to troubleshoot, please consider improving. Thanks!