try:
arr = {}
n = arr.non_existing_field
except KeyError as e:
print("KeyError:", e)
except AttributeError as e:
print("AttributeError:", e)
finally:
print("finally")
'''
run:
AttributeError: 'dict' object has no attribute 'non_existing_field'
finally
'''