Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Use:os.getcwd() This will show you what is the current directory you are running this code. and use os.chdir('/home/user1/python_test/') To change it Commented Oct 7, 2020 at 10:06
  • It is the same result: os.getcwd() outputs /home/user1/python_test/ Commented Oct 7, 2020 at 10:14
  • 1
    The example works perfectly fine on my machine. There must be something else with your Python environment Commented Oct 7, 2020 at 10:20
  • uhm, and what could I search to know the problem? It is strange for me too, usually it works without error. Commented Oct 7, 2020 at 10:27