KeyError catch in eventloop