title: Getting 'KeyError' while reading '.ini' file
body: <p>I have a python project in PyCharm, i have a following directory structure:</p>
  
  <pre><code>MyProject
   |_d1
     |_d2
       |_d3
        |_Main.py
        |_config.ini
  </code></pre>
  
  <p>config.ini</p>
  
  <pre><code>; config.ini
  [DEFAULT]
  SECRET_KEY = secret-key-of-myapp
  </code></pre>
  
  <p>main.py:</p>
  
  <pre><code>    config = configparser.ConfigParser()
      config.read('config.ini')
      print('==&gt;', config.sections())
      secret_key = config['DEFAULT']['SECRET_KEY']
      print(secret_key)
  </code></pre>
  
  <p>I am getting this error</p>
  
  <pre><code>  raise KeyError(key)
  KeyError: 'SECRET_KEY'
  </code></pre>