Skip to content

running dump() fails when decode_responses=True #1254

Closed
@brianmaissy

Description

@brianmaissy

redis-py 3.3.6
python 3.6.9
Ubuntu 18.04
redis 4.0.9

I have a Redis instance that I created with decode_responses=True. When I run .dump(key) the decoder fails to decode the bytes response, which makes sense, because it isn't unicode.

  File "/home/brian/.local/lib/python3.6/site-packages/redis/client.py", line 3677, in execute
    return execute(conn, stack, raise_on_error)
  File "/home/brian/.local/lib/python3.6/site-packages/redis/client.py", line 3570, in _execute_transaction
    response = self.parse_response(connection, '_')
  File "/home/brian/.local/lib/python3.6/site-packages/redis/client.py", line 3636, in parse_response
    self, connection, command_name, **options)
  File "/home/brian/.local/lib/python3.6/site-packages/redis/client.py", line 853, in parse_response
    response = connection.read_response()
  File "/home/brian/.local/lib/python3.6/site-packages/redis/connection.py", line 687, in read_response
    response = self._parser.read_response()
  File "/home/brian/.local/lib/python3.6/site-packages/redis/connection.py", line 442, in read_response
    response = self._reader.gets()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 1: invalid continuation byte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions