run-llama / llama-hub

A library of data loaders for LLMs made by the community -- to be used with LlamaIndex and/or LangChain
https://llamahub.ai/
MIT License
3.46k stars 733 forks source link

PDF Loader Issue #89

Closed SergeWilfried closed 1 year ago

SergeWilfried commented 1 year ago
AttributeError: module 'PyPDF2' has no attribute 'PdfReader'

Traceback

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
File "/Users/serge/Downloads/ClassGPT-main/app/01_❓_Ask.py", line 52, in <module>
    res = query_gpt(chosen_class, chosen_pdf, query)
File "/Users/serge/Downloads/ClassGPT-main/app/utils.py", line 51, in query_gpt
    documents = loader.load_data(pdf_tmp_path)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/llama_index/readers/llamahub_modules/file/pdf/base.py", line 22, in load_data
    pdf = PyPDF2.PdfReader(fp)
EmanuelCampos commented 1 year ago

It should already be fixed. If the issue persists, please don't hesitate to reopen it