FileNotFoundError when reading param from input file in dry run

Create issue
Issue #1208 new
Nikos Tsardakas Renhuldt created an issue

I have specified a parameter using a function. The function opens a file specified as an input to the rule. When attempting a dry run, this results in a FileNotFoundError.

I have attempted doing this with version 5.5.0.

A minimal example:

rule fails:
     input:
         filename="rule_input.file"
     output:
         touch("nevercreated.file")
     params:
         parameter = lambda wildcards, input: func(input.filename)


 def func(filename):
     with open(filename,'r') as f:
         return 1


 rule create_input:
     output:
          "rule_input.file"

Comments (0)

  1. Log in to comment