python ‘set‘ object has no attribute ‘items‘

python 发送http请求报'set' object has no attribute 'items'
原因:低级出错,headers弄成一个字符串了。应该是一个字典
headers = { "Content-Type: multipart/form-data; boundary=-------------------------acebdf13572468"}
改为

        headers = {
            "Content-Type": "multipart/form-data; boundary=-------------------------acebdf13572468"}

问题解决

posted @ 2022-01-05 17:08  linhuang  阅读(40)  评论(0编辑  收藏  举报  来源