which call above generates the `KeyError`? generally it would be cleaner to trap that error as close to where it is occurring and then raise a different, more specific error from that function (depending on where it is)