Catching all exceptions are a bad idea. Use `except KeyError` instead.