python-redis year_jxc 2024-01-31 61 阅读1分钟 问题:连接池-使用获取到的数据是二进制(aioredis==2.0.1) 解决方案:使用from_url 函数来生成地址,并使用decode_responses=True pool = aioredis.ConnectionPool.from_url(address, decode_responses=True) pool = await aioredis.Redis(connection_pool=pool, encoding='utf-8', max_connections=50)