Find answers from the community

Updated last month

Building a Chatbot

Hello there, happy Friday. I am trying to follow the python chatbot tutorial and I'm getting a LookupError on this line

year_docs = loader.loaddata( file=Path(f"./data/UBER/UBER{year}.html"), split_documents=False
)

... full screenshot attached. Any ideas?
Attachment
Screenshot_2024-11-22_at_3.51.26_PM.png
L
g
10 comments
You've excluded the code and the end of the traceback (what loader is this, for example?)
my fault, here is the full traceback
Attachment
Screenshot_2024-11-22_at_4.13.32_PM.png
i replaced the unstructredreader with the simpledirectoryreader and it seems to be working okay but still curious why the unstructuredreader is throwing the error
hmmm, feels like an issue with nltk? (clicking the "view as scrollable element" button would give a more complete traceback)

Maybe try with a fresh venv? Or you might need to run nltk download for something. The full traceback would probably help indentify which nltk package is missing
sorry, new to python and resisting the urge to use the TS lib which im more familiar with
that fixed it. thanks again
Great! (Usually this lib is included automatically with installing llama-index, kind of spooky!)
i think it tried (?) but i might have accidentally stopped the download when it inquired about cert signing
Add a reply
Sign up and join the conversation on Discord