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

redis.exceptions.ResponseError: unknown command 'JSON.SET'

Open lRafaelOliveira opened this issue 3 years ago • 2 comments

Ola, Estou tentando Utilizar o REJSON no python, ja iniciei utilizando o pip install rejson, instala normal, porem sempre me retorna esse erro, que nao esta encontrando o comando JSON.SET.. o que poderia ser ? estou rodando o servidor redis no localhost do windows..

  File "d:\RAFA\WHATSAPP\whatsapp-bot\redis2.py", line 7, in <module>
    r.execute_command('JSON.SET',"dic")
  File "C:\Users\hto-r\AppData\Local\Programs\Python\Python39\lib\site-packages\redis\client.py", line 901, in execute_command
    return self.parse_response(conn, command_name, **options)
  File "C:\Users\hto-r\AppData\Local\Programs\Python\Python39\lib\site-packages\redis\client.py", line 915, in parse_response
    response = connection.read_response()
  File "C:\Users\hto-r\AppData\Local\Programs\Python\Python39\lib\site-packages\redis\connection.py", line 756, in read_response
    raise response
redis.exceptions.ResponseError: unknown command 'JSON.SET'   ```

lRafaelOliveira avatar Oct 21 '21 19:10 lRafaelOliveira

  • How are you running the server on windows?
  • Are you using the docker?
  • Did you load the RedisJSON module?

Please check: https://oss.redis.com/redisjson/

gkorland avatar Oct 22 '21 05:10 gkorland

@lRafaelOliveira would you remember how you managed to solve this error? I'm getting the same error here.

I have a docker image running redis and an application that should be connecting to it. I'm able to connect to the docker image running redis on terminal and run the commands just fine (e.g. JSON.GET) But when my application tries running the same command, I see the error: redis.exceptions.ResponseError: unknown command 'JSON.GET', with args beginning with: 'store:1234' '.'

katiany avatar Dec 13 '23 14:12 katiany