Python Redis 儲存hash型別資料value為list時報錯問題 阿新 • • 發佈:2020-12-12 技術標籤:Pythonredis Python Redis 儲存hash型別資料value為list時報錯問題 # 儲存一段hash到redis中,發現報錯 a = {"a": "111", "b": [1, 2, 3, 4]} redis_store_3.hmset("111", a) 報錯資訊: redis.exceptions.DataError: Invalid input of type: ‘list’. Convert to a bytes, string, int or float first. 檢視python的redis版本 此處降級版本到2.10.6即可 再次執行程式碼將成功執行