-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Checklist
- Python version 3.9.7
- Using hiredis 2.0.0
- Using uvloop 0.16.0
- Does issue exists against the
masterbranch of aredis? - yes
Steps to reproduce
From time to time we're getting error list' object has no attribute 'decode'
This is the stack
File "/usr/local/lib/python3.9/site-packages/aredis/commands/strings.py", line 210, in mset
return await self.execute_command('MSET', *items)
File "/usr/local/lib/python3.9/site-packages/aredis/client.py", line 156, in execute_command
return await self.parse_response(connection, command_name, **options)
File "/usr/local/lib/python3.9/site-packages/aredis/client.py", line 175, in parse_response
return callback(response, **options)
File "/usr/local/lib/python3.9/site-packages/aredis/utils.py", line 91, in bool_ok
return nativestr(response) == 'OK'
File "/usr/local/lib/python3.9/site-packages/aredis/utils.py", line 25, in nativestr
return x if isinstance(x, str) else x.decode('utf-8', 'replace')
AttributeError: 'list' object has no attribute 'decode'
Expected behavior
Not throwing exceptions on MSET command
Actual behavior
Throwing exception with the above stack - probably in some race or timeout/disconnect situation (pretty rare - once a 10K requests)