[GH-ISSUE #102] ChromaDB Not working. #65

Closed
opened 2026-10-15 18:03:59 +00:00 by bsakaguchi · 8 comments
Owner

Originally created by @Tomolasthill on GitHub (Aug 3, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/102

Yes, I've seen there are two other open issues. Posting a new one here to bring more transparency to it and to provide information.
I don't know when it broke, as I have auto-connect for Extra API. But today I noticed it was broken and has probably been for some time.

When trying to start SillyTavern Extra, it gave the following error when initializing ChromaDB:

Initializing ChromaDB
Traceback (most recent call last):
  File "F:\LLM\TavernExtra\[server.py](http://server.py/)", line 268, in <module>
    chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, settings=Settings(anonymized_telemetry=False))
AttributeError: module 'chromadb' has no attribute 'PersistentClient'

F:\LLM\TavernExtra>pause
Press any key to continue . . .

I checked here and saw someone having same issue and had it fixed by upgrading it:

pip install --upgrade chromadb` 
This upgraded my ChromaDB from 0.3.3 or something to 0.4.4
`PS F:\LLM> pip show chromadb
Name: chromadb
Version: 0.4.4
Summary: Chroma.
Home-page:
Author:
Author-email: Jeff Huber <jeff@trychroma.com>, Anton Troynikov <anton@trychroma.com>
License:
Location: c:\python\python310\lib\site-packages
Requires: chroma-hnswlib, fastapi, importlib-resources, numpy, onnxruntime, overrides, posthog, pulsar-client, pydantic, pypika, requests, tokenizers, tqdm, typing-extensions, uvicorn
Required-by:

However, this didn't help. It did, however, give me a new error message log:

F:\LLM\TavernExtra>python server.py --enable-modules=chromadb
Using torch device: cpu
Initializing ChromaDB
Traceback (most recent call last):
  File "F:\LLM\TavernExtra\server.py", line 268, in <module>
    chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, settings=Settings(anonymized_telemetry=False))
  File "C:\Python\Python310\lib\site-packages\chromadb\__init__.py", line 73, in PersistentClient
    return Client(settings)
  File "C:\Python\Python310\lib\site-packages\chromadb\__init__.py", line 110, in Client
    api = system.instance(API)
  File "C:\Python\Python310\lib\site-packages\chromadb\config.py", line 195, in instance
    impl = type(self)
  File "C:\Python\Python310\lib\site-packages\chromadb\api\segment.py", line 82, in __init__
    self._manager = self.require(SegmentManager)
  File "C:\Python\Python310\lib\site-packages\chromadb\config.py", line 134, in require
    inst = self._system.instance(type)
  File "C:\Python\Python310\lib\site-packages\chromadb\config.py", line 195, in instance
    impl = type(self)
  File "C:\Python\Python310\lib\site-packages\chromadb\segment\impl\manager\local.py", line 73, in __init__
    // PersistentLocalHnswSegment.get_file_handle_count()
  File "C:\Python\Python310\lib\site-packages\chromadb\segment\impl\vector\local_persistent_hnsw.py", line 398, in get_file_handle_count
    hnswlib_count = hnswlib.Index.file_handle_count
AttributeError: type object 'hnswlib.Index' has no attribute 'file_handle_count

F:\LLM\TavernExtra>pause
Press any key to continue . . .

PersistentClient is still.. Persistent issue. But I now have more errors.
I tried to just re-install the requirement for SillyTavern Extra pip install -r requirements-complete.txt and I uninstalled chromaDB and reinstalled it:

pip uninstall chromadb
pip install chromadb

I still have the same issue and can't use chromadb (main reason I use Extras).. Hope this is an ChromaDB issue with Extras, and not a python dependencies issue and/or is difficult to solve.

Anyhow, heading to bed. May not reply for a while.

Originally created by @Tomolasthill on GitHub (Aug 3, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/102 Yes, I've seen there are two other open issues. Posting a new one here to bring more transparency to it and to provide information. I don't know when it broke, as I have auto-connect for Extra API. But today I noticed it was broken and has probably been for some time. When trying to start SillyTavern Extra, it gave the following error when initializing ChromaDB: ``` Initializing ChromaDB Traceback (most recent call last): File "F:\LLM\TavernExtra\[server.py](http://server.py/)", line 268, in <module> chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, settings=Settings(anonymized_telemetry=False)) AttributeError: module 'chromadb' has no attribute 'PersistentClient' F:\LLM\TavernExtra>pause Press any key to continue . . . ``` I checked here and saw someone having same issue and had it fixed by upgrading it: ``` pip install --upgrade chromadb` This upgraded my ChromaDB from 0.3.3 or something to 0.4.4 `PS F:\LLM> pip show chromadb Name: chromadb Version: 0.4.4 Summary: Chroma. Home-page: Author: Author-email: Jeff Huber <jeff@trychroma.com>, Anton Troynikov <anton@trychroma.com> License: Location: c:\python\python310\lib\site-packages Requires: chroma-hnswlib, fastapi, importlib-resources, numpy, onnxruntime, overrides, posthog, pulsar-client, pydantic, pypika, requests, tokenizers, tqdm, typing-extensions, uvicorn Required-by: ``` However, this didn't help. It did, however, give me a new error message log: ``` F:\LLM\TavernExtra>python server.py --enable-modules=chromadb Using torch device: cpu Initializing ChromaDB Traceback (most recent call last): File "F:\LLM\TavernExtra\server.py", line 268, in <module> chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, settings=Settings(anonymized_telemetry=False)) File "C:\Python\Python310\lib\site-packages\chromadb\__init__.py", line 73, in PersistentClient return Client(settings) File "C:\Python\Python310\lib\site-packages\chromadb\__init__.py", line 110, in Client api = system.instance(API) File "C:\Python\Python310\lib\site-packages\chromadb\config.py", line 195, in instance impl = type(self) File "C:\Python\Python310\lib\site-packages\chromadb\api\segment.py", line 82, in __init__ self._manager = self.require(SegmentManager) File "C:\Python\Python310\lib\site-packages\chromadb\config.py", line 134, in require inst = self._system.instance(type) File "C:\Python\Python310\lib\site-packages\chromadb\config.py", line 195, in instance impl = type(self) File "C:\Python\Python310\lib\site-packages\chromadb\segment\impl\manager\local.py", line 73, in __init__ // PersistentLocalHnswSegment.get_file_handle_count() File "C:\Python\Python310\lib\site-packages\chromadb\segment\impl\vector\local_persistent_hnsw.py", line 398, in get_file_handle_count hnswlib_count = hnswlib.Index.file_handle_count AttributeError: type object 'hnswlib.Index' has no attribute 'file_handle_count F:\LLM\TavernExtra>pause Press any key to continue . . . ``` PersistentClient is still.. Persistent issue. But I now have more errors. I tried to just re-install the requirement for SillyTavern Extra `pip install -r requirements-complete.txt` and I uninstalled chromaDB and reinstalled it: ``` pip uninstall chromadb pip install chromadb ``` I still have the same issue and can't use chromadb (main reason I use Extras).. Hope this is an ChromaDB issue with Extras, and not a python dependencies issue and/or is difficult to solve. Anyhow, heading to bed. May not reply for a while.
bsakaguchi 2026-10-15 18:03:59 +00:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@Cohee1207 commented on GitHub (Aug 3, 2023):

Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose.

<!-- gh-comment-id:1663488851 --> @Cohee1207 commented on GitHub (Aug 3, 2023): Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose.
Author
Owner

@Acruid commented on GitHub (Aug 5, 2023):

Removing and reinstalling the entire conda environment from the beginning worked for me.

<!-- gh-comment-id:1666455202 --> @Acruid commented on GitHub (Aug 5, 2023): Removing and reinstalling the entire conda environment from the beginning worked for me.
Author
Owner

@EriIaz commented on GitHub (Aug 5, 2023):

Removing and reinstalling the entire conda environment from the beginning worked for me.

But it didn't work for me, sadly.
Can you share the process please? The version of python, the version of libraries, the contents of your requirements.txt and requirements-complete.txt?

<!-- gh-comment-id:1666469049 --> @EriIaz commented on GitHub (Aug 5, 2023): > Removing and reinstalling the entire conda environment from the beginning worked for me. But it didn't work for me, sadly. Can you share the process please? The version of python, the version of libraries, the contents of your requirements.txt and requirements-complete.txt?
Author
Owner

@Tomolasthill commented on GitHub (Aug 5, 2023):

Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose.

I see.. Though, I'd rather not install Conda atm. I'll do it later if the issue doesn't 'magically' resolve itself after a while. For now I've 'fixed' the issue by just reverting to a previous state with git checkout command. ChromaDB works for now.

<!-- gh-comment-id:1666640424 --> @Tomolasthill commented on GitHub (Aug 5, 2023): > Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose. I see.. Though, I'd rather not install Conda atm. I'll do it later if the issue doesn't 'magically' resolve itself after a while. For now I've 'fixed' the issue by just reverting to a previous state with git checkout <commit> command. ChromaDB works for now.
Author
Owner

@Sanicoke commented on GitHub (Aug 8, 2023):

Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose.

I've tried everything and am currently following the new install guide with conda on Arch Linux and I currently get this error constantly with nothing actually being stored. I've deleted the conda environment multiple times having it always giving me a similar error.

Queried empty/missing collection for 'CharacterHere - 2023-8-8 @10h 08m 04s 142ms'.
127.0.0.1 - - [08/Aug/2023 04:02:27] "POST /api/chromadb/query HTTP/1.1" 200 -
<!-- gh-comment-id:1669343672 --> @Sanicoke commented on GitHub (Aug 8, 2023): > Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose. I've tried everything and am currently following the new install guide with conda on Arch Linux and I currently get this error constantly with nothing actually being stored. I've deleted the conda environment multiple times having it always giving me a similar error. ``` Queried empty/missing collection for 'CharacterHere - 2023-8-8 @10h 08m 04s 142ms'. 127.0.0.1 - - [08/Aug/2023 04:02:27] "POST /api/chromadb/query HTTP/1.1" 200 - ```
Author
Owner

@Cohee1207 commented on GitHub (Aug 8, 2023):

@Sanicoke collection only populates when the chat crosses a specific threshold. Please, screenshot your extension settings. And let me know how long is your chat.

<!-- gh-comment-id:1669764508 --> @Cohee1207 commented on GitHub (Aug 8, 2023): @Sanicoke collection only populates when the chat crosses a specific threshold. Please, screenshot your extension settings. And let me know how long is your chat.
Author
Owner

@rosx27 commented on GitHub (Aug 8, 2023):

Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose.

I've tried everything and am currently following the new install guide with conda on Arch Linux and I currently get this error constantly with nothing actually being stored. I've deleted the conda environment multiple times having it always giving me a similar error.

Queried empty/missing collection for 'CharacterHere - 2023-8-8 @10h 08m 04s 142ms'.
127.0.0.1 - - [08/Aug/2023 04:02:27] "POST /api/chromadb/query HTTP/1.1" 200 -

same here

<!-- gh-comment-id:1669823137 --> @rosx27 commented on GitHub (Aug 8, 2023): > > Create a new conda env and reinstall dependencies. System Python installs are not recommended, they are hard to diagnose. > > I've tried everything and am currently following the new install guide with conda on Arch Linux and I currently get this error constantly with nothing actually being stored. I've deleted the conda environment multiple times having it always giving me a similar error. > > ``` > Queried empty/missing collection for 'CharacterHere - 2023-8-8 @10h 08m 04s 142ms'. > 127.0.0.1 - - [08/Aug/2023 04:02:27] "POST /api/chromadb/query HTTP/1.1" 200 - > ``` same here
Author
Owner

@Cohee1207 commented on GitHub (Sep 3, 2023):

Cleaning up ChromaDB issues into one: https://github.com/SillyTavern/SillyTavern-Extras/issues/110

<!-- gh-comment-id:1704318652 --> @Cohee1207 commented on GitHub (Sep 3, 2023): Cleaning up ChromaDB issues into one: https://github.com/SillyTavern/SillyTavern-Extras/issues/110
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/SillyTavern-Extras#65
No description provided.