My code:
String = open(r"C:\Users\chloe\OneDrive\Documents\Python\Python code\Python text files\Story\VerbJust.txt", "r").read()
print(String)
I have the file stored in the exact folder, but I got an error:``
Traceback (most recent call last):
File "C:\Users\chloe\OneDrive\Documents\Python\Python code\StoryClasses.py", line 47, in <module>
VerbTo = ReadFile("VerbTo")
File "C:\Users\chloe\OneDrive\Documents\Python\Python code\StoryClasses.py", line 41, in ReadFile
string = open(w[variable][0], "r").read()
FileNotFoundError: [Errno 2] No such file or directory: 'C'
Why is this? Can Python not access OneDrive?