我想在redis中使用python将数据插入到排序集中,以执行复杂的查询,如范围等
import redis
redisClient = redis.StrictRedis(host='localhost', port=6379,db=0)
redisClient.zadd("players",1,"rishu")
但是当我运行上面的代码时,我得到如下错误
AttributeError: 'str' object has no attribute 'items'
我在这里做错了什么。用这个链接作为参考 https://pythontic.com/database/redis/sorted%20set%20-%20add%20and%20remove%20elements
目前没有回答
相关问题 更多 >
编程相关推荐