首页 > 编程语言 > 详细

python3 stock send() 函数报错: TypeError: a bytes-like object is required, not 'str'

时间:2021-08-30 09:05:24      阅读:15      评论:0      收藏:0      [点我收藏+]

python3 stock send() 函数报错: TypeError: a bytes-like object is required, not ‘str‘

原因:

python2 send() 函数接收的参数类型是 str,而 python3 send() 函数接收的数据类型是 bytes,所以在 python3 中需要将 send() 的入参使用 encode() 进行转化

 

 

技术分享图片

 

python3 stock send() 函数报错: TypeError: a bytes-like object is required, not 'str'

原文:https://www.cnblogs.com/gxfaxe/p/15202067.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!