Adazhu
December 12, 2024, 5:43pm
1
Hi Everyone,
I ran the code to load PDF docs in my Jupyter Notebook in my laptop. I got this error. Could you please advice me? Thanks.
Try1:
! pip install pypdf
! pip install pydantic -U
from langchain.document_loaders import PyPDFLoader
loader = PyPDFLoader(“./databook.pdf”)
pages = loader.load()
Try2:
%pip install -qU pypdf
pip install pydantic==1.10.11
from langchain_community.document_loaders import PyPDFLoader
loader = PyPDFLoader(“./databook.pdf”)
pages =
async for page in loader.alazy_load():
pages.append(page)
can you share a screenshot of the complete error
in the course they pypdf??
there must be a requirement txt file which provides information on versions of modules you should have to run the codes locally successfully.
did you check that? for pydantic
Adazhu
December 12, 2024, 7:05pm
5
what is the version of ‘pydantic’? do you have any doc about how to generate the info? how to connect to Langchain?
Adazhu
December 12, 2024, 7:40pm
6
Please see my questions above. Sorry for confusing you from the previous API connect info.
Adazhu
December 12, 2024, 7:55pm
7
How can I check pydantic versions of modules? Could you provide sample code here? how the txt file looks like? thanks.
version information will be available in file name requirements.txt file, which you will find in the lesson you working on by clicking File==>Open section.
Let me know if the issue still persist.