Skip to content

ProtectedOutputException is thrown for unprotected file #10

@kpj

Description

@kpj

Snakemake version
5.7.0

Describe the bug
When trying to re-execute a rule using snakemake -R <rulename>, snakemake throws an ProtectedOutputException even though the output file is not protected.
Downgrading to snakemake 5.6.0 solves the problem.

Minimal example
Consider the following Snakefile:

rule all:
    input:
        'out.txt'

rule dummy:
    output:
        'out.txt'
    shell:
        """
        touch {output}
        """

Executing it for the first time works as expected:

$ snakemake
Building DAG of jobs...
Using shell: /usr/local/bin/bash
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
	count	jobs
	1	all
	1	dummy
	2

[Tue Oct  8 13:57:07 2019]
rule dummy:
    output: out.txt
    jobid: 1

[Tue Oct  8 13:57:07 2019]
Finished job 1.
1 of 2 steps (50%) done

[Tue Oct  8 13:57:07 2019]
localrule all:
    input: out.txt
    jobid: 0

[Tue Oct  8 13:57:07 2019]
Finished job 0.
2 of 2 steps (100%) done

Re-executing dummy then fails:

$ snakemake -R dummy
Building DAG of jobs...
Using shell: /usr/local/bin/bash
Provided cores: 1
Rules claiming more threads will be scaled down.
Job counts:
	count	jobs
	1	all
	1	dummy
	2
ProtectedOutputException in line 5 of /private/tmp/example/Snakefile:
Write-protected output files for rule dummy:
out.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions