I get this error when I try to catch a KeyError twice. Is there anything in python which prevents you trying to catch the same error twice?
$ ./scratch.py
try getting a
can't get a try getting b
Traceback (most recent call last):
File "./scratch.py", line 13, in <module>
print dict['b']
KeyError: 'b'
The simplified code is below
dict={}
dict['c'] = '3'
try:
print 'try getting a'
print dict['a']
except KeyError:
print 'can\'t get a try getting b'
print dict['b']
except:
print 'can\'t get a or b'