Skip to content

Improve error handling when files don't exist, e.g. in engine run #3

@dacb

Description

@dacb

In an environment without some of the paths listed in the config, e.g. /work/software directory, engine run will throw an error that should probably be caught and handled. E.g.,

(barrelseq) [dacb@D-10-19-48-52 ~/work/barrelseq]$ ./shim.py engine run --config-file /tmp/mytoy/config.yaml 
config file validation succeeded
CompletedProcess(args='/work/software/samtools/bin/samtools faidx /tmp/mytoy/data/reference.fasta', returncode=127, stderr=b'/bin/sh: /work/software/samtools/bin/samtools: No such file or directory\n')
Traceback (most recent call last):
  File "./shim.py", line 10, in <module>
    barrelseq.command_line.main()
  File "/Users/dacb/work/barrelseq/barrelseq/command_line.py", line 545, in main
    args.func(args)
  File "/Users/dacb/work/barrelseq/barrelseq/engine/run.py", line 116, in run
    if len(step) < args.processes:
TypeError: '<' not supported between instances of 'int' and 'NoneType'

This maybe part of a larger question about where and when these options should be validated. Probably in barrelseq/config.py:validate?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions