requests.exceptions.InvalidHeader: Value for header {XX: (‘XX‘,)} must be of type str or bytes, not

requests.exceptions.InvalidHeader: Value for header {
    
    xxx: ('xxx',)} must be of type str or bytes, not <class 'tuple'>

在这里插入图片描述
检查代码后面是不是多了个逗号(,);传值的时候后面带了逗号就会变成元组了。

猜你喜欢

转载自blog.csdn.net/weixin_44949068/article/details/117815304