a bytes-like object is required, not 'str'

碰到 这个错误 ,是因为需要是的bytes,不是str

bytes -> str:

python3 str和bytes之间转换

 

str-> bytes:

python3 str和bytes之间转换

 

相关文章: