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
--show-failed-logs
if binary file used as log
file
#2826
Labels
bug
Something isn't working
Comments
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 19, 2024
This replicates snakemake#2826 Unfortunately this test seems to currently crush the pytest test execution
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 19, 2024
Previously a binary log file would cause `show_logs` to crash the whole snakemake workflow execution with a `UnicodeDecodeError`. Closes snakemake#2826
This was referenced Apr 19, 2024
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 19, 2024
This replicates snakemake#2826 Unfortunately this test seems to currently crush the pytest test execution
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 19, 2024
Previously a binary log file would cause `show_logs` to crash the whole snakemake workflow execution with a `UnicodeDecodeError`. Closes snakemake#2826
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 19, 2024
This replicates snakemake#2826 Unfortunately this test seems to currently crush the pytest test execution
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 19, 2024
Previously a binary log file would cause `show_logs` to crash the whole snakemake workflow execution with a `UnicodeDecodeError`. Closes snakemake#2826
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 22, 2024
This replicates snakemake#2826 Unfortunately this test seems to currently crush the pytest test execution when failing. Given that it should not fail any more I think this may be acceptable.
votti
pushed a commit
to FroeseLab/snakemake
that referenced
this issue
Apr 22, 2024
Previously a binary log file would cause `show_logs` to crash the whole snakemake workflow execution with a `UnicodeDecodeError`. Closes snakemake#2826
johanneskoester
pushed a commit
that referenced
this issue
Apr 28, 2024
…-failed-logs` (#2827) ### Description As described in #2826 currently the whole snakemake execution crashes if a log file is binary and `show-failed-logs` is used. This fix prevents the crash by capturing the `UnicodeDecodeError` and returning an error message that the log file is not a text instead. ### QC * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). --------- Co-authored-by: Vito Zanotelli <vito.zanotelli@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Snakemake version
main
banchDescribe the bug
If a binary file is set as
log
output and--show-failed-logs
(or other options triggering logs to be shown) is activated, if a job crashes the whole workflow execution crashes as snakemake tries to print the binarylog
file as text.Logs
Minimal example
Snakefile
:Run with:
Additional context
I encountered this issue when running a workflow that uses the
log
to store R environment when the rule is run (I guess to facilitate debugging).For me this triggered a whole
Slurm
execution to fail and it took me quite a while to figure out what was going on.The text was updated successfully, but these errors were encountered: