Open ButteryImportant opened 10 months ago
you need to install any python pdf reader. try pip install pypdf
Requirement already satisfied: pypdf in /usr/local/python/3.10.8/lib/python3.10/site-packages (3.15.5)
Then i ran the command again, it said:
Traceback (most recent call last):
File "/workspaces/chatgpt-retrieval/chatgpt.py", line 35, in
Checked sqlite3 version, its 3.38
try pip install "unstructured[pdf]"
Same problem did the install of both mentioned commands above yet problem persist.
PS D:\TT Project\personal_chatgpt> python chatgpt.py "what is my name?"
Traceback (most recent call last):
File "chatgpt.py", line 35, in
Traceback (most recent call last): File "/workspaces/chatgpt-retrieval/chatgpt.py", line 35, in
index = VectorstoreIndexCreator().from_loaders([loader])
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/indexes/vectorstore.py", line 81, in from_loaders
docs.extend(loader.load())
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/document_loaders/directory.py", line 156, in load
self.load_file(i, p, docs, pbar)
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/document_loaders/directory.py", line 105, in load_file
raise e
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/document_loaders/directory.py", line 99, in load_file
sub_docs = self.loader_cls(str(item), self.loader_kwargs).load()
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/document_loaders/unstructured.py", line 86, in load
elements = self._get_elements()
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/document_loaders/unstructured.py", line 172, in _get_elements
return partition(filename=self.file_path, self.unstructured_kwargs)
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/unstructured/partition/auto.py", line 292, in partition
_partition_pdf = _get_partition_with_extras("pdf")
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/unstructured/partition/auto.py", line 110, in _get_partition_with_extras
raise ImportError(
ImportError: partition_pdf is not available. Install the pdf dependencies with pip install "unstructured[pdf]"