redis / redis-py

Redis Python client
MIT License
12.69k stars 2.53k forks source link

Issue with AsyncGraph Query call #3373

Open YaphetKG opened 2 months ago

YaphetKG commented 2 months ago

Version: https://github.com/redis/redis-py/blob/master/redis/commands/graph/commands.py#L262

Description: The call above awaits a non async function and generates the following exception when using AsyncGraph class

   |   File "...kgx_chain.py", line 120, in concept_details_kgx
    |     result = await redis_graph.query(query, read_only=True)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "...\site-packages\redis\commands\graph\commands.py", line 262, in query
    |     response = await self.execute_command(*command)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | TypeError: object list can't be used in 'await' expression
    +------------------------------------