Project

General

Profile

Actions

Bug #19976

open

Better error when 'location' is not a string

Added by Peter Amstutz almost 2 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
CWL
Target version:
Story points:
-

Description

When a 'location' field in the input in not a string, it will fail with an error like

AttributeError: 'CommentedSeq' object has no attribute 'split'

It should explicitly check that 'location' is a string and report a more meaningful error.

Most of the code here is actually in cwltool so that might be a better place to fix it.


Files

cat.cwl (141 Bytes) cat.cwl Brett Smith, 01/24/2023 10:09 PM
cat-params.yml (38 Bytes) cat-params.yml Brett Smith, 01/24/2023 10:09 PM
Actions #1

Updated by Peter Amstutz almost 2 years ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz almost 2 years ago

  • Description updated (diff)

Updated by Brett Smith almost 2 years ago

cwltool has almost the exact same problem, at least as of 3.1.20221201130942:

$ cwltool cat.cwl cat-params.yml
INFO /opt/arvados/arvenv/bin/cwltool 3.1.20221201130942
INFO Resolved 'cat.cwl' to 'file:///home/brett/Curii/Notes/cat.cwl'
ERROR Unhandled error, try again with --debug for more information:
  'int' object has no attribute 'startswith'

It seems to validate input CWL with salad-schema. Does it not do the same for input parameters? If that's doable it seems like it would be the ideal fix.

Actions

Also available in: Atom PDF