I'm trying to change the directory to the folder that contains the folder I'm in.
That is, I'm in /Users/ethanfuerst/Documents/Coding/mpgdata and I'm trying to go back to /Users/ethanfuerst/Documents/Coding and access a text file in the Coding folder.
When I run this code:
import os print(os.getcwd()) os.chdir('Users/ethanfuerst/Documents/Coding') I get this output and error
/Users/ethanfuerst/Documents/Coding/mpgdata --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) <ipython-input-19-6c6ee01785f6> in <module> 1 import os 2 print(os.getcwd()) ----> 3 os.chdir('Users/ethanfuerst/Documents/Coding') FileNotFoundError: [Errno 2] No such file or directory: '\u2068Users/ethanfuerst/Documents/Coding' Does anyone know why this could be the case?
Edit: forgot to mention I am on a Mac