title: I want to except the error if the user input a different value from what the programm wants ( a,b etc)
body: <p>I tried put except Keyerror: or except Exception nothing really work python continue give this error if for example i input a Traceback (most recent call last):
  KeyError: 'a'</p>
  
  <pre><code>roman_to_decimal = { 'I': 1,'i':1,'v':5 , 'V': 5,'x':10, 'X': 10,'l':50, 'L': 50,'c':100, 'C': 100, \
                           'd':500,'D': 500, 'm':1000,'M': 1000 }
      #decimal to roman 
      def int2roman(numberdec):
          numerals={1:"I", 4:"IV", 5:"V", 9: "IX", 10:"X", 40:"XL", 50:"L",
                    90:"XC", 100:"C", 400:"CD", 500:"D", 900:"CM", 1000:"M"}
          result=""
          for value, numeral in sorted(numerals.items(), reverse=True):
              while numberdec &gt;= value:
                  result += numeral
                  numberdec -= value
          return result
      while True:
          try:  
              numberchk=(input("Enter a Roman numeral or a Decimal numeral:" ))
              break
  #the problem is here 
      except:
          print ("Oops!  That was no valid numeral.  Try again...")
  </code></pre>