简体   繁体   中英

redis send_command error not found

Using redis and following the tutorials from http://nullege.com/codes/search/redis.Redis.send_command

When trying this example:

results = r.send_command(
        'ZRANGEBYSCORE %s 0 %s LIMIT 0 %s\r\n' % (
            qk,
            ts,
            limit

In my case i am getting:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Redis' object has no attribute 'send_command'

And redis.Redis hasnt method send_command(). This is a method of the Connection class. https://github.com/andymccurdy/redis-py/blob/master/redis/connection.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM