err Invalid input of type: 'dict'. Convert to a byte, string or number first

一个问题引发的血案:

用python向redis写入数据报错:

redis.exceptions.DataError: Invalid input of type: ‘dict‘. Convert to a byte, string or number first.

查看redis的版本:

pip3 freeze

显示现在的redis版本是:

redis==3.2.1

对redis降版:

pip3 install -U redis==2.10.6 #将当前版本降级到2.10.6

成功写入数据。

err Invalid input of type: 'dict'. Convert to a byte, string or number first

原文地址:https://www.cnblogs.com/liangxiaoji/p/10973412.html

时间: 2024-07-30 20:59:29

err Invalid input of type: 'dict'. Convert to a byte, string or number first的相关文章

PostgreSQL - invalid input syntax for type timestamp with time zone

问题 在执行以下sql时报错: select COALESCE(null,null,now(),''); 报错如下: SQL Error [22007]: ERROR: invalid input syntax for type timestamp with time zone: "" Position: 33 org.postgresql.util.PSQLException: ERROR: invalid input syntax for type timestamp with t

[GraphQL] Create an Input Object Type for Complex Mutations

When we have certain mutations that require more complex input parameters, we can leverage the Input Object Type in GraphQL. In this video, we’ll learn how to create an Input Object Type and how to add it to a GraphQL Mutation Type. const express = r

java.lang.Error: Unresolved compilation problems: Syntax error on token "return", delete this token Type mismatch: cannot convert from Init to String

java.lang.Error: Unresolved compilation problems:   Syntax error on token "return", delete this token  Type mismatch: cannot convert from Init to String Dubbo 在调用服务时候报的错误! 那么问题来了.这什么错? ? 英语不好.     Type mismatch: cannot convert from Init to Strin

jquery改变input的type属性

今天在做一个登录页面时,当我把input的type属性值设置为password后,input的默认值被“*”替换(图一),导致输入框不能正常提示用户输入信息,代码如下: 1 <input type="password" class="text-input fs pass" value="请输入密码"> (图一) 如果把密码输入框的type属性更改为text后,不利于密码输入时的保密性.所以需要在密码输入框获得焦点时通过jquery的a

移除HTML5 input在type=&quot;number&quot;时的上下小箭头

/*移除HTML5 input在type="number"时的上下小箭头*/ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button{ -webkit-appearance: none !important; margin: 0; } input[type="number"]{-moz-appearance:textfield;}

input【type=&quot;checkbox&quot;】标签与字体对齐

今天分享一个比较实用的技巧,在实际项目中我们会经常遇到表单的input标签多选和单选的问题,但是往往由于标签自身的样式和我们项目的风格很不搭调,就不能实现了,今天就来告诉大家怎么去实现吧. 第一种:利用伪类:(开源中国) 需要注意的是:在页面布局中,还是有input[type=checkbox]的: 它的样式如下所示: 后面就是通过js脚本来控制它去实现了: 第二种:采用图片 这是一个树形控件zTree 注意事项:图片最好做好两种状态图,并且合并成精灵图,注意类名的应用,指引入一次,后面的修改b

HTML5学习笔记简明版(5):input的type超级类型

HTML5为input的type类型添加了多种枚举值,用来表达不同的意思.同事具有验证功能,假设格式不正确,浏览器将原始提供错误提示,堪称超级牛X啊,详细例如以下: Keyword Data type hidden 随意字符 text 单行文本 search 单行文本 tel 单行文本 url 绝对地址 email 一个或多个email地址 password 单行文本 datetime 带有时区的时间 date 无时区的年月日时间 month 无时区的年月 week 无时区的周数 time 无时

ie8下修改input的type属性报错

摘要: 现在有一个需求如图所示,当用户勾选显示明文复选框时,要以明文显示用户输入的密码,去掉勾选时要变回密文,刚开始想到的就是修改输入框的type来决定显示明文还是密文,使用jQuery的attr来做试验,测试结果是chrome,Firefox,ie9+都是好的,在ie8以下就会报错,查找了下原因,ie8中是不允许修改input的type属性,最终换了种思路实现. 当勾选显示明文时替换输入框为type="text",不勾选时在将输入框替换为type="password&quo

Invalid input for operation: physical_network &#39;physnet1&#39; unknown for flat provider network.

在devstack中  按照这个教程给bare metal创建flat network,一切都配置好之后, 执行net-create时遇到错误: Invalid input for operation: physical_network 'physnet1' unknown for flat provider network. 最后才发现解决方法是: 不要仅仅重启 q-agt (neutron-plugin-openvswitch-agent), 而要重启所有的neutron服务. Invali