Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Error Messages (pipestat implementation) #425

Closed
donaldcampbelljr opened this issue Oct 24, 2023 · 2 comments
Closed

Better Error Messages (pipestat implementation) #425

donaldcampbelljr opened this issue Oct 24, 2023 · 2 comments
Assignees
Milestone

Comments

@donaldcampbelljr
Copy link
Contributor

Related to:
#392
#397

In my attempt to replicate #392, I noticed that, when using a looper config file for pipestat, if the pipestat initialization fails, Looper will raise an exception telling the user that they must configure pipestat to use the desired command.

However, Looper doesn't tell the user why pipestat initialization failed.

Example - Say I give looper an incorrect config file:

pep_config: ./project/project_config.yaml
output_dir: ./results
pipeline_interfaces:
  sample:  null     <----Problem is here
pipestat:
  results_file_path: results.yaml

Running command:
looper check --looper-config .looper_pipestat.yaml

I see this:

Traceback (most recent call last):
  File "/home/drc/GITHUB/looper/master/looper/venv/bin/looper", line 8, in <module>
    sys.exit(main())
  File "/home/drc/GITHUB/looper/master/looper/venv/lib/python3.10/site-packages/looper/cli_looper.py", 
line 742, in main
    raise PipestatConfigurationException("check")
looper.exceptions.PipestatConfigurationException: Pipestat must be configured for command check

It would be better to tell the user why pipestat configuration failed.

@donaldcampbelljr
Copy link
Contributor Author

Another, concrete example, troubleshooting custom sample names via sample_table_index, I will get an attribute error if I use looper run (which is the correct error if the custom names are not set up properly). However, if I use something like looper check, I am informed that looper.exceptions.PipestatConfigurationException: Pipestat must be configured for command check. This is actually the wrong error and would be confusing to the end user.

@donaldcampbelljr
Copy link
Contributor Author

Error's should be propagating better now with work done in #496
Marking this as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants