hiredis-py icon indicating copy to clipboard operation
hiredis-py copied to clipboard

Hiredis Is Failing To Handle `notEnoughData` Keyword Argument

Open ramchandra-st opened this issue 1 year ago • 1 comments

Hi Folks,

I'm getting the following error from hiredis.

Do you have any insight about this error?

Error traces:

self.on_connect()
  File "../lib/python3.11/site-packages/redis/connection.py", line 320, in on_connect
    self._parser.on_connect(self)
  File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/redis/_parsers/hiredis.py", line [66], in on_connect
    self._reader = hiredis.Reader(**kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'notEnoughData' is an invalid keyword argument for this function

ramchandra-st avatar Jul 31 '24 04:07 ramchandra-st

i have the same problem on redis==5.0.8, rollback to redis==5.0.7 works for me

...
  File ".../env/lib/python3.9/site-packages/channels_redis/core.py", line 504, in group_add
    await connection.zadd(group_key, {channel: time.time()})
  File ".../env/lib/python3.9/site-packages/redis/asyncio/client.py", line 610, in execute_command
    conn = self.connection or await pool.get_connection(command_name, **options)
  File ".../env/lib/python3.9/site-packages/redis/asyncio/connection.py", line 1049, in get_connection
    await self.ensure_connection(connection)
  File ".../env/lib/python3.9/site-packages/redis/asyncio/connection.py", line 1082, in ensure_connection
    await connection.connect()
  File ".../env/lib/python3.9/site-packages/redis/asyncio/connection.py", line 291, in connect
    await self.on_connect()
  File ".../env/lib/python3.9/site-packages/redis/asyncio/connection.py", line 325, in on_connect
    self._parser.on_connect(self)
  File ".../env/lib/python3.9/site-packages/redis/_parsers/hiredis.py", line 173, in on_connect
    self._reader = hiredis.Reader(**kwargs)
TypeError: 'notEnoughData' is an invalid keyword argument for this function

darkbarker avatar Aug 28 '24 17:08 darkbarker

@ramchandra-st Looks like you are using an old version of hiredis-py. I recommend upgrading redis-py to the latest version and ensuring that hiredis-py is updated as well.

uglide avatar Apr 23 '25 12:04 uglide