algoliasearch-client-python
algoliasearch-client-python copied to clipboard
SearchIndex.search_async does not work. RuntimeWarning: coroutine 'TransporterAsync.retry' was never awaited
trafficstars
- Algolia CLient Version: 3.0.0
- Language version: 3.12.3
Description
I am trying to use SearchIndex.search_async, but running into issue with TransporterAsync.retry
traceback:
/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py:88: RuntimeWarning: coroutine 'TransporterAsync.retry' was never awaited
self._context.run(self._callback, *self._args)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Steps to reproduce
import asyncio
from algoliasearch.search_client_async import SearchClientAsync
from algoliasearch.search_index import SearchIndex
async def main():
async with SearchClientAsync.create("abc", "def") as c:
i = c.init_index("index`")
r = await i.search_async('cell')
print(r)
asyncio.run(main())
The sync version works