-
Notifications
You must be signed in to change notification settings - Fork 186
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
Error in snakemake wrapper goes not to log file #885
Comments
which wrapper are you using? |
samtools / stats |
I think that is because that is not a wrapper error, but rather a |
I see. Then this is more of a feature request. If there is such an error in a normal rule. It gets detected by the main snakemake instance at the very beginning. Here the rule gets submitted and only there is it caught. Also if there is anything else in the wrapper that doesn't work the error will just be printed to the stderr or stdout. Which will likely be missed. |
But those errors should be caught if you do a dry run of your workflow, no? |
Snakemake version: 7.32.3 I am getting a similar issue where logs for rules that use snakemake wrappers aren't getting written to logs if they error out. Running the jobs locally, correctly writes the errors. Will snakemake still upload the logs to remote storage if that rule errors out? |
Can you provide an example of the logs you expect to be written? |
The rule:
And the written log on local: |
If you run locally, you say that it "correctly writes the errors"; what do you mean? Does it write them to the screen? To the rule And when is the message not printed? When you run it in a cluster? Are you using slurm? |
The error is written to the log file specified in the snakemake rule. The cluster is a google kubernetes cluster. No log file is created. Completed rules do write the log file. |
And do you see the same behavior with rules that do not use wrappers? Or is it only when using wrappers? |
@johanneskoester I would like to add logging to each wrapper. I think we can do this more or less automated. E.g. I would like to add something like the following code at the beginning of each wrapper.
Eventually, the |
Yeah, my python scripts without the sys.excethook = handle_exception that @SilasK posted have the same problem. |
Snakemake version
Note the Snakemake and snakemake-wrappers version for which you experience the bug.
Always make sure to try out the latest version of both before creating a new bug report.
7.15
Describe the bug
Error in snakemake wrapper goes not to log file
Logs
Minimal example
see log
Additional context
cluster execution
The text was updated successfully, but these errors were encountered: