Weird python key error
<pre><code>Traceback (most recent call last):
  File "&lt;pyshell#9&gt;", line 1, in &lt;module&gt;
    ClosestCommonAncestor("A","C",x)
  File "C:\x\x.py", line 149, in ClosestCommonAncestor
    b = tree[otu2][0]
KeyError: ('ADBFGC', 14.5)
</code></pre>

<p>This is the function that returns the error.</p>

<pre><code>def ClosestCommonAncestor32 (otu1,otu2,tree):
    while True:
        a = tree[otu1][0][0]
        while True:
           b = tree[otu2][0]
            if a == b:
                return a
            otu2 = b
        otu1 = a
</code></pre>

<p>this is the tree input </p>

<pre><code>{'A': [('AD', 4.0), None, None], 'C': [('ADBFGC', 14.5), None, None], 'B': [('BF', 0.5), None, None], 'E': [('ADBFGCE', 17.0), None, None], 'D': [('AD', 4.0), None, None], 'G': [('BFG', 6.25), None, None], 'F': [('BF', 0.5), None, None], 'ADBFG': [('ADBFGC', 6.25), ('AD', 4.25), ('BFG', 2.0)], 'BF': [('BFG', 5.75), ('B', 0.5), ('F', 0.5)], 'ADBFGC': [('ADBFGCE', 2.5), ('ADBFG', 6.25), ('C', 14.5)], 'ADBFGCE': [None, ('ADBFGC', 2.5), ('E', 17.0)], 'BFG': [('ADBFG', 2.0), ('BF', 5.75), ('G', 6.25)], 'AD': [('ADBFG', 4.25), ('A', 4.0), ('D', 4.0)]}
</code></pre>

<p>I don't understand this, I thought Keyerror was when it requested a key that didn't exist?
Thanks</p>
