Skip to content

azure-search-documents #40138

Open
Open
@matt3o

Description

@matt3o
  • azure-search-documents
  • 11.6.0b10
  • Ubuntu 24.04
  • Python 3.12.3

Describe the bug

In the most recent prerelease, setting debug='all' in the search() call raises a DeserializationError. This is due the newly available debug information DocumentDebugInfo which apparently cannot be deserialized into a dictionary.
Sadly I cannot provide any sample code at this point but I am happy to provide additional information if needed.
Currently this makes the debug flag ununsable in Python code.

To Reproduce
Steps to reproduce the behavior:

  1. Call azure.search.documents.indexes.aio.SearchIndexClient.search() with debug='all'
  2. Iterate over the results with async for doc in result: -> Boom this crashes

Expected behavior
No exception raised, it should be returned as a dict

Additional context

ERROR  [178742] 2025-03-19 14:25:27  xxx   - error: HTTPException(status_code=500, detail='SearchException: RetryError[<Future at 0x7f7abcd552b0 state=finished raised DeserializationError>]')
tb: Traceback (most recent call last):
  File "/home/matteo/linux_code/xxx/.lvenv/lib/python3.12/site-packages/azure/search/documents/_generated/_serialization.py", line 1680, in deserialize_data
    return self.deserialize_type[iter_type](data, data_type[1:-1])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/linux_code/xxx/.lvenv/lib/python3.12/site-packages/azure/search/documents/_generated/_serialization.py", line 1707, in deserialize_iter
    raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr)))
azure.core.exceptions.DeserializationError: Cannot deserialize as [DocumentDebugInfo] an object of type <class 'dict'>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/matteo/linux_code/xxx/.lvenv/lib/python3.12/site-packages/azure/search/documents/_generated/_serialization.py", line 1680, in deserialize_data
    return self.deserialize_type[iter_type](data, data_type[1:-1])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/linux_code/xxx/.lvenv/lib/python3.12/site-packages/azure/search/documents/_generated/_serialization.py", line 1708, in deserialize_iter
    return [self.deserialize_data(a, iter_type) for a in attr]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/linux_code/xxx/.lvenv/lib/python3.12/site-packages/azure/search/documents/_generated/_serialization.py", line 1692, in deserialize_data
    return self._deserialize(obj_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/linux_code/xxx/.lvenv/lib/python3.12/site-packages/azure/search/documents/_generated/_serialization.py", line 1495, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc["type"])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/matteo/linux_code/xxx/.lvenv/lib/python3.12/site-packages/azure/search/documents/_generated/_serialization.py", line 1691, in deserialize_data
    raise DeserializationError(msg) from err
azure.core.exceptions.DeserializationError: Unable to deserialize response data. Data: {'semantic': None, 'vectors': {'subscores': {'documentBoost': 10.0, 'text': {'searchScore': 23.989803314208984}, 'vectors': [{'embedding': {'searchScore': 0.7097161412239075, 'vectorSimilarity': 0.5909859704254476}}]}}}, [DocumentDebugInfo]```

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.SearchbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions