Closed vishalnagda1 closed 3 months ago
@vishalnagda1, we've fixed this problem in latest main
with #2378. Can you pull from main
instead of latest (0.5.3) pypi version.
The issue is that newer clients add additional attributes that older servers will not return, thus throwing the KeyError
you see above.
You can also upgrade your server to version 0.5.3. Our general recommendation to avoid similar errors in the future is to upgrade servers and clients in lockstep.
Thank you for your help! Pulling the latest changes from the main branch as you suggested resolved the issue. I've updated my project, and everything is working smoothly now. I appreciate your guidance and quick response. I'll close this issue now.
What happened?
After updating chromadb from version 0.4.24 to 0.5.3, our Flask application throws a KeyError: 'dimension' when attempting to create a collection. This error does not occur in version 0.4.24. It seems that the newer version may have changed how dimensions are handled, but there was no clear documentation on how to adapt to these changes.
Environment:
Steps to Reproduce:
Expected Result: The application should successfully interact with the chromadb client to get or create a collection without errors, as it did in version 0.4.24.
Actual Result: The application fails and throws the following error: KeyError: 'dimension' The traceback points to the line where create_collection attempts to access dimension from a JSON response, which apparently does not exist in the new version.
Code Snippet: Here is the relevant part of the code that leads to the exception:
Additional Context: It's possible that the newer version of chromadb handles dimensions differently or the key has been renamed or removed. Any guidance on handling this change or a fix would be greatly appreciated.
Versions
Relevant log output