Skip to content

Potentially missing attribute is_safe when instantiating a _WeaviateUUIDInt class #1275

Closed
@tibor-reiss

Description

@tibor-reiss

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions