Python socket.error:[Errno 32]管道断裂错误

Python socket.error:[Errno 32]管道断裂错误,python,antivirus-integration,Python,Antivirus Integration,当我运行Virustotal提供的代码时,出现以下错误: socket.error: [Errno 32] Broken pipe error 我对Python很幼稚,任何帮助都将不胜感激 import postfile host = "www.virustotal.com" selector = "https://www.virustotal.com/vtapi/v2/file/scan" fields = [("apikey", "1fe0ef5feca2f84eb450bc3617f83

当我运行Virustotal提供的代码时,出现以下错误:

socket.error: [Errno 32] Broken pipe error
我对Python很幼稚,任何帮助都将不胜感激

import postfile
host = "www.virustotal.com"
selector = "https://www.virustotal.com/vtapi/v2/file/scan"
fields = [("apikey", "1fe0ef5feca2f84eb450bc3617f839e317b2a686af4d651a9bada77a522201b0")]
file_to_send = open("test.txt", "rb").read()
files = [("file", "test.txt", file_to_send)]
json = postfile.post_multipart(host, selector, fields, files)
print json

这意味着您正在写入另一端已关闭的连接。如何修复它?此
postfile
模块是什么?对于postfile: