自学内容网 自学内容网

Python redis获取的结果是字节不是字符串

Python redis获取的结果是字节不是字符串

pool = redis.ConnectionPool(host='localhost',port=6379, password=REDIS_PWD, decode_responses=True)

  • 需要指明给结果解码decode_responses=True才能返回字符串

原文地址:https://blog.csdn.net/ithongchou/article/details/140404271

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!