techleadhd / chatgpt-retrieval

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do i fix this

ButteryImportant opened this issue · comments

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]"

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
index = VectorstoreIndexCreator().from_loaders([loader])
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/indexes/vectorstore.py", line 82, in from_loaders
return self.from_documents(docs)
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/indexes/vectorstore.py", line 87, in from_documents
vectorstore = self.vectorstore_cls.from_documents(
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 612, in from_documents
return cls.from_texts(
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 567, in from_texts
chroma_collection = cls(
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 80, in init
import chromadb
File "/usr/local/python/3.10.8/lib/python3.10/site-packages/chromadb/init.py", line 69, in
raise RuntimeError(
RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.

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
index = VectorstoreIndexCreator().from_loaders([loader])
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\langchain\indexes\vectorstore.py", line 83, in from_loaders
return self.from_documents(docs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\langchain\indexes\vectorstore.py", line 88, in from_documents
vectorstore = self.vectorstore_cls.from_documents(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\langchain\vectorstores\chroma.py", line 771, in from_documents
return cls.from_texts(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\langchain\vectorstores\chroma.py", line 707, in from_texts
chroma_collection = cls(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\langchain\vectorstores\chroma.py", line 81, in init
import chromadb
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\chromadb_init_.py", line 78, in
raise RuntimeError(
RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.
Please visit https://docs.trychroma.com/troubleshooting#sqlite to learn how to upgrade.