Python 错误集合

1. TypeError: a bytes-like object is required ,not 'str'?

Solution:

如果是 Python 3.x,参数是 bytes的话,正确的写法是 b"xxx" 或者 "xxx".encode()

猜你喜欢

转载自blog.csdn.net/chaowang1994/article/details/80272660