Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazonlinunx2: RESP3 Returns List in Python 3.7 #2746

Closed
rafie opened this issue May 4, 2023 · 1 comment
Closed

Amazonlinunx2: RESP3 Returns List in Python 3.7 #2746

rafie opened this issue May 4, 2023 · 1 comment
Labels
bug Bug

Comments

@rafie
Copy link

rafie commented May 4, 2023

redis-py: 5.0.0b3
redis: 7.2-rc1
python: 3.7
platform: Linux (amazonlinux:2 has native Python 3.7, but Python 3.7 from pyenv on any Linux will do)

How to reproduce:

git clone --recursive https://github.com/RedisBloom/RedisBloom.git
docker run -it -v $PWD/RedisBloom:/bloom amazonlinux:2 bash

In docker:

cd /bloom
./deps/readies/bin/getpy3
./sbin/system-setup.py
bash -l
./deps/readies/bin/getredis -v 7
make
make flow-tests TEST=test_resp3 GEN=1 AOF=0 SLAVES=0 CLUSTER=0 VERBOSE=1

To debug, place BB() in tests/flow/test_resp3.py (before line 32) and invoke:

make flow-tests TEST=test_resp3 GEN=1 AOF=0 SLAVES=0 CLUSTER=0 VERBOSE=1 BB=1

Stack trace:

Traceback (most recent call last):
  File "/root/.local/lib/python3.7/site-packages/RLTest/__main__.py", line 712, in run_jobs
    obj = test.create_instance()
  File "/root/.local/lib/python3.7/site-packages/RLTest/loader.py", line 60, in create_instance
    return self.cls(*args, **kwargs)
  File "/w/rafi_1/RedisBloom/tests/flow/test_resp3.py", line 32, in __init__
    self.env = Env(protocol=3)
  File "/root/.local/lib/python3.7/site-packages/RLTest/env.py", line 244, in __init__
    self.start()
  File "/root/.local/lib/python3.7/site-packages/RLTest/env.py", line 335, in start
    self.envRunner.startEnv(masters, slaves)
  File "/root/.local/lib/python3.7/site-packages/RLTest/redis_std.py", line 320, in startEnv
    self.waitForRedisToStart(con, self.masterProcess)
  File "/root/.local/lib/python3.7/site-packages/RLTest/redis_std.py", line 250, in waitForRedisToStart
    wait_for_conn(con, proc, retries=1000 if self.debugger else 200)
  File "/root/.local/lib/python3.7/site-packages/RLTest/utils.py", line 16, in wait_for_conn
    if conn.execute_command(command) == shouldBe:
  File "/root/.local/lib/python3.7/site-packages/redis/client.py", line 1330, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "/root/.local/lib/python3.7/site-packages/redis/connection.py", line 997, in get_connection
    connection.connect()
  File "/root/.local/lib/python3.7/site-packages/redis/connection.py", line 248, in connect
    self.on_connect()
  File "/root/.local/lib/python3.7/site-packages/redis/connection.py", line 310, in on_connect
    response = self.read_response()
  File "/root/.local/lib/python3.7/site-packages/redis/connection.py", line 420, in read_response
    response = self._parser.read_response(disable_decoding=disable_decoding)
  File "/root/.local/lib/python3.7/site-packages/redis/parsers/resp3.py", line 26, in read_response
    disable_decoding=disable_decoding, push_request=push_request
  File "/root/.local/lib/python3.7/site-packages/redis/parsers/resp3.py", line 101, in _read_response
    for _ in range(int(response))
  File "/root/.local/lib/python3.7/site-packages/redis/parsers/resp3.py", line 101, in <dictcomp>
    for _ in range(int(response))
  File "/root/.local/lib/python3.7/site-packages/redis/parsers/resp3.py", line 79, in _read_response
    for _ in range(int(response))
  File "/root/.local/lib/python3.7/site-packages/redis/parsers/resp3.py", line 79, in <listcomp>
    for _ in range(int(response))
  File "/root/.local/lib/python3.7/site-packages/redis/parsers/resp3.py", line 101, in _read_response
    for _ in range(int(response))
  File "/root/.local/lib/python3.7/site-packages/redis/parsers/resp3.py", line 101, in <dictcomp>
    for _ in range(int(response))
TypeError: unhashable type: 'list'
@chayim chayim added the bug Bug label May 7, 2023
@chayim chayim changed the title Failure to execute a command over RESP3 connection with Python 3.7 Amazonlinunx2: RESP3 Returns List in Python 3.7 May 8, 2023
@dvora-h
Copy link
Collaborator

dvora-h commented Jun 17, 2023

Fixed in #2757

@dvora-h dvora-h closed this as completed Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

No branches or pull requests

3 participants