[GH-ISSUE #97] Chromadb fix #63

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

Originally created by @SpaceDuck41 on GitHub (Jul 31, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/97

For anyone having issue with the chromadb error, just change the code in the google collab ( under silero tts extras) related to chromadb(managed to fix it using chatgpt) to this one:

if (extras_enable_chromadb):
# Install the chromadb module
!pip install chromadb

# Import and initialize ChromaDB
import chromadb
client = chromadb.PersistentClient(path="/content/drive/My Drive/chromadb_directory/")
ExtrasModules.append('chromadb')
Originally created by @SpaceDuck41 on GitHub (Jul 31, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/97 For anyone having issue with the chromadb error, just change the code in the google collab ( under silero tts extras) related to chromadb(managed to fix it using chatgpt) to this one: if (extras_enable_chromadb): # Install the chromadb module !pip install chromadb # Import and initialize ChromaDB import chromadb client = chromadb.PersistentClient(path="/content/drive/My Drive/chromadb_directory/") ExtrasModules.append('chromadb')
bsakaguchi 2026-10-15 18:03:53 +00:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@donlinglok1 commented on GitHub (Aug 1, 2023):

seems fixed in https://github.com/SillyTavern/SillyTavern-extras/commit/38b6403ca1bbe6da896975fafb0d2cdf1ee96198

<!-- gh-comment-id:1659438751 --> @donlinglok1 commented on GitHub (Aug 1, 2023): seems fixed in [https://github.com/SillyTavern/SillyTavern-extras/commit/38b6403ca1bbe6da896975fafb0d2cdf1ee96198](url)
Author
Owner

@xNissX233 commented on GitHub (Aug 1, 2023):

I was able to run it but still have errors:

127.0.0.1 - - [01/Aug/2023 10:11:07] "OPTIONS /api/chromadb HTTP/1.1" 200 -
--- Logging error ---
Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 263, in _notify_one
    sub.callback([embedding])
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 210, in _write_records
    self._ensure_index(len(records), len(record["embedding"]))
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_hnsw.py", line 205, in _ensure_index
    self._init_index(dim)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 157, in _init_index
    index.init_index(
TypeError: init_index(): incompatible function arguments. The following argument types are supported:
    1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None

Invoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 1100, in emit
    msg = self.format(record)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 943, in format
    return fmt.format(record)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 678, in format
    record.message = record.getMessage()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 392, in handle
    super().handle()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 433, in handle
    self.handle_one_request()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 421, in handle_one_request
    method()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 364, in run_wsgi
    execute(self.server.app)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 325, in execute
    application_iter = app(environ, start_response)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2213, in __call__
    return self.wsgi_app(environ, start_response)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 308, in decorated_view
    return fn(*args, **kwargs)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 756, in chromadb_add_messages
    collection.upsert(
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 302, in upsert
    self._client._upsert(
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/segment.py", line 287, in _upsert
    self._producer.submit_embedding(coll["topic"], r)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 142, in submit_embedding
    self._notify_all(topic_name, embedding_record)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 249, in _notify_all
    self._notify_one(sub, embedding)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 266, in _notify_one
    logger.error(
Message: 'Exception occurred invoking consumer for subscription f5158891-4205-4327-be29-868db9b293dbto topic persistent://default/default/763e9daf-f7b4-4fe4-b6d6-03293d19c8af for embedding id msg-14 '
Arguments: (TypeError("init_index(): incompatible function arguments. The following argument types are supported:\n    1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None\n\nInvoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28'"),)
--- Logging error ---
Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 263, in _notify_one
    sub.callback([embedding])
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 210, in _write_records
    self._ensure_index(len(records), len(record["embedding"]))
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_hnsw.py", line 205, in _ensure_index
    self._init_index(dim)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 157, in _init_index
    index.init_index(
TypeError: init_index(): incompatible function arguments. The following argument types are supported:
    1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None

Invoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 1100, in emit
    msg = self.format(record)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 943, in format
    return fmt.format(record)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 678, in format
    record.message = record.getMessage()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 392, in handle
    super().handle()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 433, in handle
    self.handle_one_request()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 421, in handle_one_request
    method()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 364, in run_wsgi
    execute(self.server.app)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 325, in execute
    application_iter = app(environ, start_response)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2213, in __call__
    return self.wsgi_app(environ, start_response)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 308, in decorated_view
    return fn(*args, **kwargs)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 756, in chromadb_add_messages
    collection.upsert(
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 302, in upsert
    self._client._upsert(
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/segment.py", line 287, in _upsert
    self._producer.submit_embedding(coll["topic"], r)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 142, in submit_embedding
    self._notify_all(topic_name, embedding_record)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 249, in _notify_all
    self._notify_one(sub, embedding)
  File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 266, in _notify_one
    logger.error(
Message: 'Exception occurred invoking consumer for subscription f5158891-4205-4327-be29-868db9b293dbto topic persistent://default/default/763e9daf-f7b4-4fe4-b6d6-03293d19c8af for embedding id msg-15 '
Arguments: (TypeError("init_index(): incompatible function arguments. The following argument types are supported:\n    1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None\n\nInvoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28'"),)
<!-- gh-comment-id:1659799829 --> @xNissX233 commented on GitHub (Aug 1, 2023): I was able to run it but still have errors: ``` 127.0.0.1 - - [01/Aug/2023 10:11:07] "OPTIONS /api/chromadb HTTP/1.1" 200 - --- Logging error --- Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 263, in _notify_one sub.callback([embedding]) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 210, in _write_records self._ensure_index(len(records), len(record["embedding"])) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_hnsw.py", line 205, in _ensure_index self._init_index(dim) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 157, in _init_index index.init_index( TypeError: init_index(): incompatible function arguments. The following argument types are supported: 1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None Invoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 1100, in emit msg = self.format(record) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 943, in format return fmt.format(record) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 678, in format record.message = record.getMessage() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 368, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Call stack: File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 973, in _bootstrap self._bootstrap_inner() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 683, in process_request_thread self.finish_request(request, client_address) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 747, in __init__ self.handle() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 392, in handle super().handle() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 433, in handle self.handle_one_request() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 421, in handle_one_request method() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 364, in run_wsgi execute(self.server.app) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 325, in execute application_iter = app(environ, start_response) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2213, in __call__ return self.wsgi_app(environ, start_response) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 308, in decorated_view return fn(*args, **kwargs) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 756, in chromadb_add_messages collection.upsert( File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 302, in upsert self._client._upsert( File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/segment.py", line 287, in _upsert self._producer.submit_embedding(coll["topic"], r) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 142, in submit_embedding self._notify_all(topic_name, embedding_record) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 249, in _notify_all self._notify_one(sub, embedding) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 266, in _notify_one logger.error( Message: 'Exception occurred invoking consumer for subscription f5158891-4205-4327-be29-868db9b293dbto topic persistent://default/default/763e9daf-f7b4-4fe4-b6d6-03293d19c8af for embedding id msg-14 ' Arguments: (TypeError("init_index(): incompatible function arguments. The following argument types are supported:\n 1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None\n\nInvoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28'"),) --- Logging error --- Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 263, in _notify_one sub.callback([embedding]) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 210, in _write_records self._ensure_index(len(records), len(record["embedding"])) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_hnsw.py", line 205, in _ensure_index self._init_index(dim) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 157, in _init_index index.init_index( TypeError: init_index(): incompatible function arguments. The following argument types are supported: 1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None Invoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 1100, in emit msg = self.format(record) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 943, in format return fmt.format(record) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 678, in format record.message = record.getMessage() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/logging/__init__.py", line 368, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Call stack: File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 973, in _bootstrap self._bootstrap_inner() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 683, in process_request_thread self.finish_request(request, client_address) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 747, in __init__ self.handle() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 392, in handle super().handle() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 433, in handle self.handle_one_request() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 421, in handle_one_request method() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 364, in run_wsgi execute(self.server.app) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/werkzeug/serving.py", line 325, in execute application_iter = app(environ, start_response) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2213, in __call__ return self.wsgi_app(environ, start_response) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 308, in decorated_view return fn(*args, **kwargs) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/SillyTavern-extras/server.py", line 756, in chromadb_add_messages collection.upsert( File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 302, in upsert self._client._upsert( File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/api/segment.py", line 287, in _upsert self._producer.submit_embedding(coll["topic"], r) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 142, in submit_embedding self._notify_all(topic_name, embedding_record) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 249, in _notify_all self._notify_one(sub, embedding) File "/run/media/ruben/Prime/CharacterAI/oobabooga_linux/installer_files/env/lib/python3.10/site-packages/chromadb/db/mixins/embeddings_queue.py", line 266, in _notify_one logger.error( Message: 'Exception occurred invoking consumer for subscription f5158891-4205-4327-be29-868db9b293dbto topic persistent://default/default/763e9daf-f7b4-4fe4-b6d6-03293d19c8af for embedding id msg-15 ' Arguments: (TypeError("init_index(): incompatible function arguments. The following argument types are supported:\n 1. (self: hnswlib.Index, max_elements: int, M: int = 16, ef_construction: int = 200, random_seed: int = 100, allow_replace_deleted: bool = False) -> None\n\nInvoked with: <hnswlib.Index(space='l2', dim=768)>; kwargs: max_elements=1000, ef_construction=100, M=16, is_persistent_index=True, persistence_location='.chroma_db/d6806a5c-e125-4d84-beab-162e8a726c28'"),) ```
Author
Owner

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

@RBNXI
Why do your Extras interfere with Oobabooga install? How did you install extras?

<!-- gh-comment-id:1659903238 --> @Cohee1207 commented on GitHub (Aug 1, 2023): @RBNXI Why do your Extras interfere with Oobabooga install? How did you install extras?
Author
Owner

@valden80 commented on GitHub (Aug 1, 2023):

I too getting error form chromaDB startup after the last update:

2023-08-01 12:39:16.825799: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-01 12:39:17.426976: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Using torch device: cpu
Initializing an image captioning model...
Initializing a text summarization model...
Initializing a sentiment classification pipeline...
Initializing ChromaDB
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/AI/SillyTavern-extras/server.py:268 in <module>                                            │
│                                                                                                  │
│   265 │   posthog.capture = lambda *args, **kwargs: None                                         │
│   266 │   if args.chroma_host is None:                                                           │
│   267 │   │   if args.chroma_persist:                                                            │
│ ❱ 268 │   │   │   chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, setting   │
│   269 │   │   │   print(f"ChromaDB is running in-memory with persistence. Persistence is store   │
│   270 │   │   else:                                                                              │
│   271 │   │   │   chromadb_client = chromadb.EphemeralClient(Settings(anonymized_telemetry=Fal   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: module 'chromadb' has no attribute 'PersistentClient'
ERROR conda.cli.main_run:execute(47): `conda run python server.py --cpu --enable-modules=caption,summarize,classify,chromadb --listen` failed. (See above for error)
<!-- gh-comment-id:1659960679 --> @valden80 commented on GitHub (Aug 1, 2023): I too getting error form chromaDB startup after the last update: ``` 2023-08-01 12:39:16.825799: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-08-01 12:39:17.426976: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Using torch device: cpu Initializing an image captioning model... Initializing a text summarization model... Initializing a sentiment classification pipeline... Initializing ChromaDB ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/AI/SillyTavern-extras/server.py:268 in <module> │ │ │ │ 265 │ posthog.capture = lambda *args, **kwargs: None │ │ 266 │ if args.chroma_host is None: │ │ 267 │ │ if args.chroma_persist: │ │ ❱ 268 │ │ │ chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, setting │ │ 269 │ │ │ print(f"ChromaDB is running in-memory with persistence. Persistence is store │ │ 270 │ │ else: │ │ 271 │ │ │ chromadb_client = chromadb.EphemeralClient(Settings(anonymized_telemetry=Fal │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AttributeError: module 'chromadb' has no attribute 'PersistentClient' ERROR conda.cli.main_run:execute(47): `conda run python server.py --cpu --enable-modules=caption,summarize,classify,chromadb --listen` failed. (See above for error) ```
Author
Owner

@xNissX233 commented on GitHub (Aug 1, 2023):

@RBNXI Why do your Extras interfere with Oobabooga install? How did you install extras?

I installed it in the same conda than oobabooga, is that wrong?

<!-- gh-comment-id:1659965112 --> @xNissX233 commented on GitHub (Aug 1, 2023): > @RBNXI Why do your Extras interfere with Oobabooga install? How did you install extras? I installed it in the same conda than oobabooga, is that wrong?
Author
Owner

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

@RBNXI There would likely be problems with that. I suggest installing into a separate environment.
@valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: pip install --upgrade chromadb

<!-- gh-comment-id:1659969341 --> @Cohee1207 commented on GitHub (Aug 1, 2023): @RBNXI There would likely be problems with that. I suggest installing into a separate environment. @valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: `pip install --upgrade chromadb `
Author
Owner

@xNissX233 commented on GitHub (Aug 1, 2023):

@RBNXI There would likely be problems with that. I suggest installing into a separate environment. `

I tried and I don't get the error anymore, but the character doesn't remember at all... I activated the extension, and I get logs of it working and the database file contains memories, but when I ask about those memories the character doesn't know, do I need more max tokens or what? (I know I have to restart for memories to load, tried and same result)

<!-- gh-comment-id:1660118065 --> @xNissX233 commented on GitHub (Aug 1, 2023): > @RBNXI There would likely be problems with that. I suggest installing into a separate environment. ` I tried and I don't get the error anymore, but the character doesn't remember at all... I activated the extension, and I get logs of it working and the database file contains memories, but when I ask about those memories the character doesn't know, do I need more max tokens or what? (I know I have to restart for memories to load, tried and same result)
Author
Owner

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

What's your model and API?

<!-- gh-comment-id:1660120406 --> @Cohee1207 commented on GitHub (Aug 1, 2023): What's your model and API?
Author
Owner

@xNissX233 commented on GitHub (Aug 1, 2023):

So it depends on the model?
I use saigaggml-model-q5_1, and Llama.cpp in Oobabooga

<!-- gh-comment-id:1660122411 --> @xNissX233 commented on GitHub (Aug 1, 2023): So it depends on the model? I use saigaggml-model-q5_1, and Llama.cpp in Oobabooga
Author
Owner

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

Exactly. The model can simply ignore what is being fed into it. Also, I don't know how good Chroma embeddings work with non-English languages (I see your model is not trained on English).

<!-- gh-comment-id:1660146072 --> @Cohee1207 commented on GitHub (Aug 1, 2023): Exactly. The model can simply ignore what is being fed into it. Also, I don't know how good Chroma embeddings work with non-English languages (I see your model is not trained on English).
Author
Owner

@xNissX233 commented on GitHub (Aug 1, 2023):

Exactly. The model can simply ignore what is being fed into it. Also, I don't know how good Chroma embeddings work with non-English languages (I see your model is not trained on English).

what model do you recommend?

<!-- gh-comment-id:1660154670 --> @xNissX233 commented on GitHub (Aug 1, 2023): > Exactly. The model can simply ignore what is being fed into it. Also, I don't know how good Chroma embeddings work with non-English languages (I see your model is not trained on English). what model do you recommend?
Author
Owner

@ghost commented on GitHub (Aug 1, 2023):

@RBNXI There would likely be problems with that. I suggest installing into a separate environment. @valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: pip install --upgrade chromadb

Thanks, this fixed chromadb's HttpClient-error I was having

<!-- gh-comment-id:1660405647 --> @ghost commented on GitHub (Aug 1, 2023): > @RBNXI There would likely be problems with that. I suggest installing into a separate environment. @valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: `pip install --upgrade chromadb ` Thanks, this fixed chromadb's HttpClient-error I was having
Author
Owner

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

@valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: pip install --upgrade chromadb

This resolved the issue for me. thanks

<!-- gh-comment-id:1663952686 --> @Wolf1030 commented on GitHub (Aug 3, 2023): >@valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: `pip install --upgrade chromadb ` This resolved the issue for me. thanks
Author
Owner

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

@RBNXI There would likely be problems with that. I suggest installing into a separate environment. @valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: pip install --upgrade chromadb

Still fails. Now it gives me this error

(extras) D:\NeuralNetworks\SillyTavern-extras>python server.py --listen --enable-modules=chromadb
Using torch device: cpu
Initializing ChromaDB
Traceback (most recent call last):
  File "D:\NeuralNetworks\SillyTavern-extras\server.py", line 268, in <module>
    chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, settings=Settings(anonymized_telemetry=False))
  File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\__init__.py", line 73, in PersistentClient
    return Client(settings)
  File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\__init__.py", line 110, in Client
    api = system.instance(API)
  File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\config.py", line 195, in instance
    impl = type(self)
  File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\api\segment.py", line 82, in __init__
    self._manager = self.require(SegmentManager)
  File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\config.py", line 134, in require
    inst = self._system.instance(type)
  File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\config.py", line 195, in instance
    impl = type(self)
  File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\segment\impl\manager\local.py", line 73, in __init__
    // PersistentLocalHnswSegment.get_file_handle_count()
  File "C:\Users\renar\.conda\envs\extras\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'

(extras) D:\NeuralNetworks\SillyTavern-extras>

Used to work well before the initial faulty change.

<!-- gh-comment-id:1666159222 --> @EriIaz commented on GitHub (Aug 4, 2023): > @RBNXI There would likely be problems with that. I suggest installing into a separate environment. @valden80 Chroma broke reverse compatibility in their Python API. You need to update Chroma in your env: `pip install --upgrade chromadb ` Still fails. Now it gives me this error ``` (extras) D:\NeuralNetworks\SillyTavern-extras>python server.py --listen --enable-modules=chromadb Using torch device: cpu Initializing ChromaDB Traceback (most recent call last): File "D:\NeuralNetworks\SillyTavern-extras\server.py", line 268, in <module> chromadb_client = chromadb.PersistentClient(path=args.chroma_folder, settings=Settings(anonymized_telemetry=False)) File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\__init__.py", line 73, in PersistentClient return Client(settings) File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\__init__.py", line 110, in Client api = system.instance(API) File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\config.py", line 195, in instance impl = type(self) File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\api\segment.py", line 82, in __init__ self._manager = self.require(SegmentManager) File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\config.py", line 134, in require inst = self._system.instance(type) File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\config.py", line 195, in instance impl = type(self) File "C:\Users\renar\.conda\envs\extras\lib\site-packages\chromadb\segment\impl\manager\local.py", line 73, in __init__ // PersistentLocalHnswSegment.get_file_handle_count() File "C:\Users\renar\.conda\envs\extras\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' (extras) D:\NeuralNetworks\SillyTavern-extras> ``` Used to work well before the initial faulty change.
Author
Owner

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

Try removing your conda env and reinstalling. There may be a conflict in hnswlib previously installed via conda

<!-- gh-comment-id:1666163013 --> @Cohee1207 commented on GitHub (Aug 4, 2023): Try removing your conda env and reinstalling. There may be a conflict in hnswlib previously installed via conda
Author
Owner

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

Try removing your conda env and reinstalling. There may be a conflict in hnswlib previously installed via conda

I've already did that before the original reply. Reinstalled the environment strictly following the guide, except for omitting cloning the SillyTavern-extras with git and I've also run pip install -r requirements-complete.txt at the end. Got the issue. Tried the same without the complete requirements, only chromadb, nltk and scikit-learn, run into the same issue.

<!-- gh-comment-id:1666181037 --> @EriIaz commented on GitHub (Aug 4, 2023): > Try removing your conda env and reinstalling. There may be a conflict in hnswlib previously installed via conda I've already did that before the original reply. Reinstalled the environment strictly following the guide, except for omitting cloning the SillyTavern-extras with git and I've also run pip install -r requirements-complete.txt at the end. Got the issue. Tried the same without the complete requirements, only chromadb, nltk and scikit-learn, run into the same issue.
Author
Owner

@FitzWM commented on GitHub (Aug 6, 2023):

I'm getting the same bug when trying to run Extras with ChromaDB. It happens on both old env and on a brand new env, both with the version of chromadb installed by requirements-complete.txt and the version from upgrading it via pip. Given that parts of the install seem to be moving to Python 3.11 - and that the program itself now complains about wanting 3.11 when it is run - I'm not even 100% sure that the installation steps are actually correct anymore. But I don't know enough about Conda and Python to really have any idea.

<!-- gh-comment-id:1666966477 --> @FitzWM commented on GitHub (Aug 6, 2023): I'm getting the same bug when trying to run Extras with ChromaDB. It happens on both old env and on a brand new env, both with the version of chromadb installed by requirements-complete.txt and the version from upgrading it via pip. Given that parts of the install seem to be moving to Python 3.11 - and that the program itself now complains about wanting 3.11 when it is run - I'm not even 100% sure that the installation steps are actually correct anymore. But I don't know enough about Conda and Python to really have any idea.
Author
Owner

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

If you have troubles with local install - run Extras from colab

<!-- gh-comment-id:1666968174 --> @Cohee1207 commented on GitHub (Aug 6, 2023): If you have troubles with local install - run Extras from colab
Author
Owner

@FitzWM commented on GitHub (Aug 6, 2023):

If you have troubles with local install - run Extras from colab

What if I...don't want to do that? I run everything - SillyTavern, various backends, StableDiffusion and various frontends, PrivateGPT, etc. - locally, without any issue. Until the recent changes to ChromaDB, I did the same with SillyTavern-extras. I get that it's a community project, but the response to "the local install seems to be broken after an update, even following the official instructions" shouldn't be "use the remote version because it actually works."

<!-- gh-comment-id:1666971720 --> @FitzWM commented on GitHub (Aug 6, 2023): > If you have troubles with local install - run Extras from colab What if I...don't want to do that? I run everything - SillyTavern, various backends, StableDiffusion and various frontends, PrivateGPT, etc. - locally, without any issue. Until the recent changes to ChromaDB, I did the same with SillyTavern-extras. I get that it's a community project, but the response to "the local install seems to be broken after an update, even following the official instructions" shouldn't be "use the remote version because it actually works."
Author
Owner

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

We didn't break chroma. They released an update that broke backward compatibility with existing installs. So we either do nothing at all and newer installs will not work or we update but those who pull and not do a reinstall will have it broken. It's a lose-lose situation with no resolution other than prompting everyone to reinstall their local chromadb.

<!-- gh-comment-id:1666973047 --> @Cohee1207 commented on GitHub (Aug 6, 2023): We didn't break chroma. They released an update that broke backward compatibility with existing installs. So we either do nothing at all and newer installs will not work or we update but those who pull and not do a reinstall will have it broken. It's a lose-lose situation with no resolution other than prompting everyone to reinstall their local chromadb.
Author
Owner

@ghost commented on GitHub (Aug 6, 2023):

I'm getting the same bug when trying to run Extras with ChromaDB. It happens on both old env and on a brand new env, both with the version of chromadb installed by requirements-complete.txt and the version from upgrading it via pip. Given that parts of the install seem to be moving to Python 3.11 - and that the program itself now complains about wanting 3.11 when it is run - I'm not even 100% sure that the installation steps are actually correct anymore. But I don't know enough about Conda and Python to really have any idea.

It's not complaining, it's recommending to use python 3.11. Python 3.10 works still currently, but most likely there will be a need to upgrade to the 3.11 in future.
I made fresh conda install just today and it runs fine if we ignore the python upgrade recommendation.

<!-- gh-comment-id:1666974390 --> @ghost commented on GitHub (Aug 6, 2023): > I'm getting the same bug when trying to run Extras with ChromaDB. It happens on both old env and on a brand new env, both with the version of chromadb installed by requirements-complete.txt and the version from upgrading it via pip. Given that parts of the install seem to be moving to Python 3.11 - and that the program itself now complains about wanting 3.11 when it is run - I'm not even 100% sure that the installation steps are actually correct anymore. But I don't know enough about Conda and Python to really have any idea. It's not complaining, it's recommending to use python 3.11. Python 3.10 works still currently, but most likely there will be a need to upgrade to the 3.11 in future. I made fresh conda install just today and it runs fine if we ignore the python upgrade recommendation.
Author
Owner

@ghost commented on GitHub (Aug 6, 2023):

We didn't break chroma. They released an update that broke backward compatibility with existing installs. So we either do nothing at all and newer installs will not work or we update but those who pull and not do a reinstall will have it broken. It's a lose-lose situation with no resolution other than prompting everyone to reinstall their local chromadb.

I think it would be better to make everyone to reinstall if there is no other solution to this. It does sound like only solution to this issue, and I'm not sure if chromadb encrypts data or not.. but I'd rather not use colab where anyone with malicious intent basically could have access to the weird chats I'm having

<!-- gh-comment-id:1666975112 --> @ghost commented on GitHub (Aug 6, 2023): > We didn't break chroma. They released an update that broke backward compatibility with existing installs. So we either do nothing at all and newer installs will not work or we update but those who pull and not do a reinstall will have it broken. It's a lose-lose situation with no resolution other than prompting everyone to reinstall their local chromadb. I think it would be better to make everyone to reinstall if there is no other solution to this. It does sound like only solution to this issue, and I'm not sure if chromadb encrypts data or not.. but I'd rather not use colab where anyone with malicious intent basically could have access to the weird chats I'm having
Author
Owner

@FitzWM commented on GitHub (Aug 6, 2023):

I made fresh conda install just today and it runs fine if we ignore the python upgrade recommendation.

Can I ask how exactly you did this? I'm not doubting you, but I just followed the instructions on the main page a few minutes ago to make a completely new env, and I get the same error with that one. It's using Python 3.10 and the version of ChromaDB installed by requirements-complete.txt - although upgrading ChromaDB via pip doesn't help, either.

Edit: Or would I need to reinstall Conda altogether? My understanding was that Conda provided a virtual environment specifically so you didn't have to do that kind of thing, but my Python knowledge is...limited.

<!-- gh-comment-id:1666976139 --> @FitzWM commented on GitHub (Aug 6, 2023): >I made fresh conda install just today and it runs fine if we ignore the python upgrade recommendation. Can I ask how exactly you did this? I'm not doubting you, but I just followed the instructions on the main page a few minutes ago to make a completely new env, and I get the same error with that one. It's using Python 3.10 and the version of ChromaDB installed by requirements-complete.txt - although upgrading ChromaDB via pip doesn't help, either. Edit: Or would I need to reinstall Conda altogether? My understanding was that Conda provided a virtual environment specifically so you didn't have to do that kind of thing, but my Python knowledge is...limited.
Author
Owner

@ghost commented on GitHub (Aug 6, 2023):

I made fresh conda install just today and it runs fine if we ignore the python upgrade recommendation.

Can I ask how exactly you did this? I'm not doubting you, but I just followed the instructions on the main page a few minutes ago to make a completely new env, and I get the same error with that one. It's using Python 3.10 and the version of ChromaDB installed by requirements-complete.txt - although upgrading ChromaDB via pip doesn't help, either.

Edit: Or would I need to reinstall Conda altogether?

I followed the guide too. But I installed miniconda for the first time today.

I would recommend clearing also your pips packages cache it has. Not sure how conda uses pip, but sometimes that helps when doing fresh install

<!-- gh-comment-id:1666976750 --> @ghost commented on GitHub (Aug 6, 2023): > >I made fresh conda install just today and it runs fine if we ignore the python upgrade recommendation. > > Can I ask how exactly you did this? I'm not doubting you, but I just followed the instructions on the main page a few minutes ago to make a completely new env, and I get the same error with that one. It's using Python 3.10 and the version of ChromaDB installed by requirements-complete.txt - although upgrading ChromaDB via pip doesn't help, either. > > Edit: Or would I need to reinstall Conda altogether? I followed the guide too. But I installed miniconda for the first time today. I would recommend clearing also your pips packages cache it has. Not sure how conda uses pip, but sometimes that helps when doing fresh install
Author
Owner

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

You tried this and it didn't help?
I tested on my older install in conda and it worked.
pip install --upgrade chromadb

<!-- gh-comment-id:1666999727 --> @Cohee1207 commented on GitHub (Aug 6, 2023): You tried this and it didn't help? I tested on my older install in conda and it worked. pip install --upgrade chromadb
Author
Owner

@FitzWM commented on GitHub (Aug 7, 2023):

Sadly, no. I tried it both in my old env and in a brand-new one made using the instructions on the main page here. The only change I made was installing from requirements-complete.txt, rather than requirements.txt - since that's required for the chromadb module. It upgraded fine, but didn't stop the error messages.

<!-- gh-comment-id:1668025435 --> @FitzWM commented on GitHub (Aug 7, 2023): Sadly, no. I tried it both in my old env and in a brand-new one made using the instructions on the main page here. The only change I made was installing from requirements-complete.txt, rather than requirements.txt - since that's required for the chromadb module. It upgraded fine, but didn't stop the error messages.
Author
Owner

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

Try this if you installed hnswlib with conda previously:

conda remove hnswlib
pip install chroma-hnswlib
<!-- gh-comment-id:1668189082 --> @Cohee1207 commented on GitHub (Aug 7, 2023): Try this if you installed hnswlib with conda previously: ``` conda remove hnswlib pip install chroma-hnswlib ```
Author
Owner

@FitzWM commented on GitHub (Aug 7, 2023):

No joy, unfortunately. The remove command told me that hnswlib couldn't be found in the target environment, and the install command reported that chroma-hnswlib was already installed. Same thing with both my old env and my fresh one.

I'm honestly really confused, since creating a fresh new env should give me a completely clean slate, right? Meaning that, if it works for other people here, it should work for me. But that doesn't seem to be the case...

Edit: I also tried purging my pip cache after this, as well as reinstalling chroma-hnswlib with pip, but got the same error after both.

<!-- gh-comment-id:1668220015 --> @FitzWM commented on GitHub (Aug 7, 2023): No joy, unfortunately. The remove command told me that hnswlib couldn't be found in the target environment, and the install command reported that chroma-hnswlib was already installed. Same thing with both my old env and my fresh one. I'm honestly really confused, since creating a fresh new env should give me a completely clean slate, right? Meaning that, if it works for other people here, it should work for me. But that doesn't seem to be the case... Edit: I also tried purging my pip cache after this, as well as reinstalling chroma-hnswlib with pip, but got the same error after both.
Author
Owner

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

@FitzWM can you show exactly what your exceptions look like?

<!-- gh-comment-id:1669756431 --> @Cohee1207 commented on GitHub (Aug 8, 2023): @FitzWM can you show exactly what your exceptions look like?
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:1704318530 --> @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#63
No description provided.