zylon-ai / private-gpt

Interact with your documents using the power of GPT, 100% privately, no data leaks
https://privategpt.dev
Apache License 2.0
53.54k stars 7.2k forks source link

Error message running ingest.py on Mac #1742

Open ThisProject8 opened 5 months ago

ThisProject8 commented 5 months ago

Thank you for this amazing opportunity to have a privateGPT on my computer.

I am almost at the finish line! I am getting an error when I run ingest.py on a Mac (using python 3.11) as follows:

File "/Users/Mycomputer/privateGPT/ingest.py", line 92, in main db = Chroma.from_documents(texts, embeddings, collection_name=collection, persist_directory=persist_directory, client_settings=CHROMA_SETTINGS) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain_community/vectorstores/chroma.py", line 778, in from_documents return cls.from_texts( ^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain_community/vectorstores/chroma.py", line 714, in from_texts chroma_collection = cls( ^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain_community/vectorstores/chroma.py", line 126, in init self._collection = self._client.get_or_create_collection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chromadb/api/local.py", line 151, in get_or_create_collection return self.create_collection( ^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chromadb/api/local.py", line 111, in create_collection check_index_name(name) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chromadb/api/local.py", line 48, in check_index_name if len(index_name) < 3 or len(index_name) > 63: ^^^^^^^^^^^^^^^ TypeError: object of type 'NoneType' has no len()

background: I have looked all over and tried bing and chatGPT for insight but I cannot figure out how to overcome this issue. I am a beginner in tech with minimal python knowledge except what I learned in one python class. I am doing this as a personal project. So essentially I am in pre-school when it comes to this. Any insights on what is causing this and on how to fix this issue?

dbzoo commented 5 months ago

The stack trace does not align with this project. Are you running this code base or just working on your own project and wanting help? If it's the later this is the wrong place to post.

Update: I see you are using this branch https://github.com/imartinez/privateGPT/tree/primordial nobody works on that as per the README This branch is frozen and won't be updated; use main branch instead