Recently, I\'m unable to use relative paths in my code while using PyCharm. For instance, a simple open(\'test.txt\', \'r\')
will not work - whereupon I am sure
I have Pycharm 4.5, so things might have changed a bit.
Try going to Settings > Project > Project Structure
On this dialog, click your folder that has the source code in it, and then click the blue folder in the menu to note it as "source" folder. I believe this fixes a lot of the path issues in Pycharm
Here is the link to "content roots": https://www.jetbrains.com/pycharm/help/content-root.html
Change: Run > Edit Configurations > Working directory, which sets the working directory for a specific project. (This is on a Mac)