Sorry, I misread. Please use `except AttributeError as ex`, as that is more forward compatible.