- 博客(1)
- 收藏
- 关注
转载 Python Socket TypeError: a bytes-like object is required, not 'str' 错误提示
在学习socket编程时,遇到代码返回如下错误:TypeError: a bytes-like object is required, not 'str'发现这里python3.5和Python2.7在套接字返回值解码上有区别。 首先可以明确,在python3中默认的编码方式是unicode。unicode 分为 utf-32(占4个字节),utf-16(占两个字节),utf-8...
2019-06-29 09:17:00 499
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人