场景
使用哈希类型存不进去redis
redis_deal.hmset("depth", {"asks": asks_list, "bids": bids_list, "time": 1631243542})
报错如下:
Invalid input of type: 'dict'. Convert to a bytes, string, int or float first.
Invalid input of type: 'dict'. Convert to a bytes, string, int or float first.
解决办法:
卸载redis:
pip3 uninstall redis
安装redis:
pip3 install redis==2.10.6
查看redis的版本:
pip freeze