Skip to content

[bug] async client: query list value type mis-match #1831

Description

@DustinJamesT

When querying text with the async client, there is a bug parsing list-type values

it occurs in your __deserialize_non_ref_prop method on the base_executor file. There is code to escape to a version + 1.25 list parser that is breaking (seems like the async client is still returning the version expected in the < 1.25 version)

if value.HasField("list_value"):
            return (
                self.__deserialize_list_value_prop_125(value.list_value)
                if self._connection._weaviate_version.is_at_least(1, 25, 0)
                else self.__deserialize_list_value_prop_123(value.list_value)
            )

If i manually edit the package to always use __deserialize_list_value_prop_123, then the async query works, so I assume the fix here is to update the async client response handlers

for reference, here is a simplified look at how im calling it

self.weaviate_async_client = weaviate.use_async_with_weaviate_cloud(
            cluster_url=os.getenv('WEAVIATE_HIGH_PERFORMANCE_CLUSTER_URL'),  
            auth_credentials=weaviate.auth.AuthApiKey(os.getenv('WEAVIATE_HIGH_PERFORMANCE_API_KEY')), 
            skip_init_checks=True,
            headers={
                    "X-OpenAI-Api-Key": os.getenv('OPENAI_API_KEY'),  
                    "X-Cohere-Api-Key": os.getenv('COHERE_API_KEY'),
                    "X-VoyageAI-Api-Key": os.getenv('VOYAGE_API_KEY')
                }
        )

collection_name = 'Posts'
collection = agent.database.weaviate_async_client.collections.get(collection_name)

await agent.database.weaviate_async_client.connect()

search_query = "decentralized training"
results = await collection.query.near_text(query=search_query, limit=10) # -- error 

python version: 3.11
weaviate version: weaviate-client-4.16.10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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