Find answers from the community

Updated 3 months ago

Hi Im trying to get the starter tutorial

Hi, Im trying to get the starter tutorial to work but I just keep getting:
ValueError: Directory data does not exist.
From the first line after the import: documents = SimpleDirectoryReader("data").load_data()
I have my .py in the paul_graham_essay folder
e
C
S
7 comments
I think you have to have you .py that has the code in the same folder of your data folder. If the name of your data folder is paul_graham_essay, change your code to:
documents = SimpleDirectoryReader("paul_graham_essay").load_data()
Hmm ok, tried that. Still no luck
If it's in the same directory I think you'll need to specify the file, like
Plain Text
reader = SimpleDirectoryReader(
    input_files=["./paul_graham_essay.txt"]
)
Oh got it. I had the entire repository open, and needed to put the full path from there, even though my .py was further down
I think it was the way I opened the example repo in vs code
Thanks for the assistance
Add a reply
Sign up and join the conversation on Discord