Skip to content

code() takes at most 15 arguments when running any command. #13

@scuml

Description

@scuml

Getting an error no matter what I run or register through gearsclient.

Even noop code like:

gb = GearsBuilder('KeysOnlyReader', r=conn)
gb.run()

returns

Traceback (most recent call last):
  File "<input>", line 1, in <module>
    gb3.run()
  File "/Users/<user>/Library/Caches/pypoetry/virtualenvs/gears-5k_d3sYO-py3.8/lib/python3.8/site-packages/gearsclient/redisgears_builder.py", line 314, in run
    ''' % selfBytes
  File "/Users/<user>/Library/Caches/pypoetry/virtualenvs/gears-5k_d3sYO-py3.8/lib/python3.8/site-packages/redis/client.py", line 901, in execute_command
    return self.parse_response(conn, command_name, **options)
  File "/Users/<user>/Library/Caches/pypoetry/virtualenvs/gears-5k_d3sYO-py3.8/lib/python3.8/site-packages/redis/client.py", line 915, in parse_response
    response = connection.read_response()
  File "/Users/<user>/Library/Caches/pypoetry/virtualenvs/gears-5k_d3sYO-py3.8/lib/python3.8/site-packages/redis/connection.py", line 756, in read_response
    raise response
redis.exceptions.ResponseError: ['Traceback (most recent call last):\n', '  File "<string>", line 3, in <module>\n', 'TypeError: code() takes at most 15 arguments (16 given)\n']

conn.execute_command("RG.PYEXECUTE", "GB().run()"). works fine.

Running on python 3.8 on Mac OS 10.15.5 connecting to current RedisGears docker image. I did manually change .dumps() in the library to use pickle protocol 4 since python 3.8 defaults to protocol 5 which doesn't exist in the RedisGear docker image using python 3.7.
eg: selfBytes = cloudpickle.dumps(self.pipe, protocol=4)

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