title: PyCharm current working directory
body: <p>Recently, I'm unable to use relative paths in my code while using PyCharm. For instance, a simple <code>open('test.txt', 'r')</code> will not work - whereupon I am sure the file exists in the same level as the running py file. PyCharm will return this error. </p>
  
  <blockquote>
    <p>FileNotFoundError: [Errno 2] No such file or directory:</p>
  </blockquote>
  
  <p>After reading answers online on StackOverflow, I have tried multiple options including:</p>
  
  <ul>
  <li>Changing <code>test.txt</code> to <code>./test.txt</code></li>
  <li>Closing project, deleting the .idea folder, open the folder with code.</li>
  <li>Reinstalling as well as installing the latest version of PyCharm.</li>
  <li>Invalidating caches and restarting.</li>
  </ul>
  
  <p>None of these options have worked for me. Is there someway I can tell PyCharm to refresh the current working directory (or even to see where it thinks the current working directory is)?</p>
  
  <p>Thanks in advance!</p>
  
  <p>Edit: I should note that running the script in a terminal window will work. This appears to be a problem with PyCharm and not the script.</p>