python2.7web代码用python3.6运行时,浏览器发送请求报错TypeError: Object of type 'bytes' is not JSON serializable的解决办法
2018-02-07 10:34
1616 查看
浏览器的Cookie由Python 2代码设置。Python 3将cookie内容解释为字节字符串。只要清除浏览器cookie就好了。
相关文章推荐
- TypeError: Object of type 'bytes' is not JSON serializable
- python3.5 模拟UDP客户端发送数据报文,报错:TypeError: a bytes-like object is required, not 'str'
- 解决Python3.6,发送POST请求错误提示:POST data should be bytes, an iterable of bytes, or a file object. It canno
- TypeError: datetime.datetime(2016, 9, 25, 21, 12, 19, 135649) is not JSON serializable解决办法(json无法序列化对象的解决办法)
- 【已解决】Object of type 'range' is not JSON serializable
- Python 出现错误TypeError: ‘NoneType’ object is not iterable解决办法
- 【已解决】Object of type 'QuerySet' is not JSON serializable
- TypeError: Object of type 'float32' is not JSON serializable
- 在使用json.dumps时遇到报错TypeError: Object of type 'float32' is not JSON serializable
- Python中3+版本运行2+版本程序出现TypeError: a bytes-like object is required, not 'str'之读取PDF中的图片
- Flask 中使用 JSON 响应页面的 Ajax 请求报错 TypeError: 'dict' object is not callable
- Python 3.x: TypeError: a bytes-like object is required, not 'str'
- django object is not JSON serializable error问题解决
- python 3.5: TypeError: a bytes-like object is required, not 'str' when writing to a file
- Python 3.x Error:TypeError: a bytes-like object is required, not 'str'
- Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node 解决办法
- python write()参数错误,导致报错TypeError: a bytes-like object is required, not 'str'
- python socket send 函数 报错:TypeError: a bytes-like object is required, not 'str'
- Python 3.5 Socket TypeError: a bytes-like object is required, not 'str' 错误提示
- python3中,socket使用send函数时出现的错误:TypeError: a bytes-like object is required, not 'str'