Catch the correct type of translation error

Just added a test for `get_attribute`