Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentially missing attribute is_safe when instantiating a _WeaviateUUIDInt class #1275

Open
tibor-reiss opened this issue Sep 3, 2024 · 0 comments

Comments

@tibor-reiss
Copy link
Contributor

The sample app weaviate_v4.py from openllmetry is throwing following error: AttributeError: '_WeaviateUUIDInt' object has no attribute 'is_safe'

For details see traceloop/openllmetry#1929

There are ways to fix this in that repo, but I am not sure if that is the best approach. How about adding this line to the constructor of _WeaviateUUIDInt (https://github.com/weaviate/weaviate-python-client/blob/main/weaviate/collections/queries/base.py#L66)?
object.__setattr__(self, "is_safe", uuid_lib.SafeUUID.unknown)
This is also the default value when creating an UUID instance.

I made the proposed change locally, ran some tests, and it looked promising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant