diff --git a/snakemake/dag.py b/snakemake/dag.py index 633e1f4a6..eed5d0059 100755 --- a/snakemake/dag.py +++ b/snakemake/dag.py @@ -502,10 +502,7 @@ def check_and_touch_output( ) except IOError as e: raise MissingOutputException( - str(e) + "\nThis might be due to " - "filesystem latency. If that is the case, consider to increase the " - "wait time with --latency-wait." - + "\nJob id: {jobid}".format(jobid=job.jobid), + str(e), rule=job.rule, jobid=self.jobid(job), ) diff --git a/snakemake/io.py b/snakemake/io.py index d22086025..2a600c99e 100755 --- a/snakemake/io.py +++ b/snakemake/io.py @@ -824,10 +824,12 @@ def get_missing(): if not get_missing(): return time.sleep(1) + missing = "\n".join(get_missing()) raise IOError( - "Missing files after {} seconds:\n{}".format( - latency_wait, "\n".join(get_missing()) - ) + f"Missing files after {latency_wait} seconds. This might be due to " + "filesystem latency. If that is the case, consider to increase the " + "wait time with --latency-wait:\n" + f"{missing}" )