新人求助,使用WiFi模块发送http包发送图片总是报OSerror -9
-
如题,下面是发送代码
def post(client,imageform,snn,weight1): ww='' client.send(header) length1=imageform.size()+len(body_sn)+len(fenge)+len(body_weight)+len(body_img)+len(snn)+len(weight1) print('leng=%d'%length1) client.send(str(length1)+'\r\n\r\n') client.send(body_sn) client.send(snn) client.send(body_weight) for jj in weight1: ww=ww+str(jj) client.send(ww) ww='' client.send(body_img) client.send(imageform) client.send("\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--\r\n")#就这句报错 print(client.recv(2048))
如果注释掉图片发送或是在发送图片之前发送就不会报错了,请大神指点迷津