AmbiguousRuleException

Two rules can both produce the same file and Snakemake will not guess

why

Wildcard patterns in two rules overlap, so more than one rule could legitimately create the requested output. Snakemake refuses to pick, because picking wrong would silently produce the wrong result.

what to do

Make the patterns non-overlapping — usually by tightening a wildcard with a constraint (wildcard_constraints) or by putting each rule's output in its own directory. ruleorder: resolves it too, but it hides the ambiguity rather than fixing it.

Snakemake documented behaviour
This is one entry from BioErrors, a catalogue of bioinformatics error messages that point at the wrong thing. Every entry was traced to its real cause before it was written down.
If your error is not in it, paste it there and it gets traced and added.