Skip to content
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

.mtime returns float, not Mtime object causes attribute errror #1482

Closed
cademirch opened this issue Mar 15, 2022 · 1 comment
Closed

.mtime returns float, not Mtime object causes attribute errror #1482

cademirch opened this issue Mar 15, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@cademirch
Copy link
Contributor

Snakemake version

7.2.0
Describe the bug

Executing using GLS with a checkpoint rule. The workflow runs fine on its first go when no outputs have been generated - the workflow stops due to rule error (a problem with the rule itself). When I try to rerun the workflow after editing the rule I get this error.

In my logs below, the job 'processmapp' was the last job run successfully (i.e. the output of processmapp exists). So snakemake should pick up at that point but it errors out. If I delete the output of the rule before processmapp then the KeyError and attribute error just reference the rule before. Can repeat this until we get to the output of the checkpoint - once I delete the output of the checkpoint then Snakemake runs fine.

I looked into this a little bit and for some reason f.mtime is returning a float only for the output file of the error producing rule.

f.mtime.local_or_remote() for f in self.expanded_output if f.exists

Logs

uilding DAG of jobs...
Updating job gather_msmc_input.
Traceback (most recent call last):
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/dag.py", line 940, in update_output_mintime
    return output_mintime[job]
KeyError: processmapp

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/dag.py", line 944, in update_output_mintime
    t = output_mintime[job_]
KeyError: processmapp

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/__init__.py", line 714, in snakemake
    success = workflow.execute(
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/workflow.py", line 779, in execute
    dag.update_checkpoint_dependencies()
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/dag.py", line 1387, in update_checkpoint_dependencies
    self.postprocess()
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/dag.py", line 1237, in postprocess
    self.update_needrun()
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/dag.py", line 1022, in update_needrun
    update_output_mintime(job)
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/dag.py", line 946, in update_output_mintime
    t = job_.output_mintime
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/jobs.py", line 574, in output_mintime
    mintime = min(
  File "/home/ubuntu/miniconda3/envs/snakemake7.1.1/lib/python3.10/site-packages/snakemake/jobs.py", line 575, in <genexpr>
    f.mtime.local_or_remote() for f in self.expanded_output if f.exists
AttributeError: 'float' object has no attribute 'local_or_remote'

Minimal example

Not yet, working on it.
Additional context

@cademirch
Copy link
Contributor Author

closed #1484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant