Never leave an generic except in the code. You should except: (KeyError, DoesNotExist) or whatever is expected to fail there.