Find answers from the community

Updated last year

I see download_loader is deprecated now

At a glance

The community member is trying to load the PDFReader, but is unsure of the actual package name as it is not called "PDFReader". Another community member suggests that the PDFReader is bundled into the "llama-index-readers-file" package. The community member then encounters a "TypeError: expected str, bytes or os.PathLike object, not UploadedFile" when trying to load a PDF through Streamlit. Other community members suggest converting the UploadedFile to a different type, and the community member eventually gets it to work using tempfile and converting it to a path.

I see download_loader is deprecated now and the solution is downloading the actual package itself. I'm trying to load PDFReader but am not sure what the actual package is called (it's not PDFReader as far as I can tell)
L
a
8 comments
ah, its bundled into llama-index-readers-file
All the default loaders for SimpleDirectoryReader went into there
sweet, thank you!
Ok so I'm now getting "TypeError: expected str, bytes or os.PathLike object, not UploadedFile". This may or may not be a LlamaIndex related issue but it's happening when I upload a PDF thru Streamlit and pass it to PDFReader's load_data() function. Interestingly, this method worked before the update πŸ€”
Really? Huh. Yea need to convert the UploadedFile to a different type
nvm, got it to work using tempfile
had to convert it to a path
thanks for your help!
Add a reply
Sign up and join the conversation on Discord