chroma
chroma copied to clipboard
[Bug]: get embeddings result sometime work ,sometime error
What happened?
r = collection.get( where={"timespan": {"$gte": 1712435107}}, include=[ "embeddings" ] )
Traceback (most recent call last): File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/api/fastapi.py", line 652, in raise_chroma_error resp.raise_for_status() File "/opt/miniconda3/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:8090/api/v1/collections/183b4fe9-b24a-4136-ad77-0943677de6a5/get
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/zyu/code/repeat/updatetime.py", line 38, in
sometime work ,but sometime error
Versions
v0.3.22
Relevant log output
No response
File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/auth/fastapi.py", line 242, in wrapped return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/server/fastapi/init.py", line 563, in get return self._api._get( ^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/init.py", line 127, in wrapper if trace_granularity < granularity: ^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/rate_limiting/init.py", line 45, in wrapper return f(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/api/segment.py", line 538, in _get vectors = vector_segment.get_vectors(ids=vector_ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/init.py", line 127, in wrapper if trace_granularity < granularity: ^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/lib/python3.12/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 330, in get_vectors results[id_to_index[id]] = VectorEmbeddingRecord( ~~~~~~~^^^^^^^^^^^^^^^^^ IndexError: list assignment index out of range
Hello @zyu, thank you for reporting the error. I was not able to reproduce it with version 0.3.22. Could you provide more details about the code and the context in which the error occurs? Did you try update to the last version of chroma?
Thanks
@zyu, In the trace I see references to opentelemetry
. We've added OTEL only in version 0.4.x
. Can you please double check your Chroma version - pip list | grep chromadb
. Thank you.
@zyu, the issue affects 0.4.x
and is being worked on. We'll have a PR for it soon.