How to subtract a dictionary's value?

can you show which lines you are getting the errors from?