Skip to content

log variable has type dict_values #3479

@JThoennissen

Description

@JThoennissen

Snakemake version
9.1.1

Describe the bug
In Snakemake 8.x the log variable, which can be accessed in onerror etc. to get the path to the Snakemake log, used to be of type string. In Snakemake 9.x it looks like the type changed to dict_values, which forces users to use something like "... {log}".format(log=next(iter(log)) instead of simply doing "... {log}" as presented in the documentation.

Logs
/usr/bin/bash: -c: line 1: syntax error near unexpected token (' /usr/bin/bash: -c: line 1: set -euo pipefail; echo dict_values(['/tools/my_software/.snakemake/log/2025-03-26T080156.150733.snakemake.log']);'

Minimal example

onerror:
    shell("echo {log}")

Now needs to be like:

onerror:
    shell("echo {log}".format(log=next(iter(log))))

Metadata

Metadata

Assignees

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