title: Except isnt working in my python 3.6 program. Why?
body: <p>So, I have a python program with a class and logger. Here is the code:</p>
  
  <pre><code>import logging
  
  path2log = "logs/1.pylog"
  
  LOG_FORMAT = "%(levelname)s - %(name)s (%(asctime)s) : %(message)s"
  
  #existing log levels are:
  #Debug
  #Info
  #Warning
  #Error
  #Critical
  
  logging.basicConfig(filename = path2log,
                      level = logging.DEBUG,
                      format = LOG_FORMAT)
  logger = logging.getLogger("1.py.logger 'CONSOLE'")
  
  class Emperor():
  
      try:
          def __init__(self, name, famname, level):
  
              try:
                  self.name = name
                  self.famname = famname
                  self.level = level
  
                  try:
                      logger.info("Emperor created with name:")
                      logger.info(self.name)
                      logger.info("family name:")
                      logger.info(self.famname)
                      logger.info("and level:")
                      logger.info(self.level)
                  except TypeError:
                      logger.error("Missing perameter creating object in emperor class")
              except TypeError:
                  logger.error("Missing perameter creating object in emperor class.")
  
      except TypeError:
          logger.error("Missing perameter creating object in emperor class.")
  </code></pre>
  
  <p>But all of the excepts in the def <strong>init</strong> area don't do anything. I still get the error when running the program. How do I fix this? </p>
  
  <p>Edit: <a href="https://i.stack.imgur.com/gHvue.png" rel="nofollow noreferrer">Here is the error:</a></p>