【问题标题】:Python module not exist [closed]Python模块不存在[关闭]
【发布时间】:2014-05-26 20:33:07
【问题描述】:

我正在使用python通过在线杀毒软件扫描pdf文件,所以我使用了 导入邮件

但是有一个错误:

ImportError: 没有名为 postfile 的模块

谁能帮帮我?

【问题讨论】:

  • 最可能的答案:您尝试使用的库位于不正确的位置。还有很多其他选择,但如果没有更多信息,很难提供任何建设性的答案......
  • 跟这个问题有什么关系? stackoverflow.com/questions/11870961/…
  • 我正在尝试这个 .................................. >>> 导入postfile >>> host = "www.virustotal.com" >>> selector = "virustotal.com/api/bulk_scan_file.json" >>> fields = [("key", "1fe0ef5feca2f84eb450bc3617f839e317b2a686af4d651a9bada77a522201b0")] >>> file_to_send = open("test.txt ", "rb").read() >>> files = [("file", "test.txt", file_to_send)] >>> json = postfile.post_multipart(host, selector, fields, files) >>>打印 json {“scan_id”:“cd1384c10baa2d5b96f397b986e2a1fc9535d2ef0e185a113fc610eca1c6fb0e-1271623480”,“结果”:1}
  • postfile 不是标准 python 库的一部分,所以你必须在使用它之前以某种方式安装它。
  • 我应该安装什么??

标签: python pdf scanning


【解决方案1】:

您需要阅读VirusTotal 文档。它明确提到需要将this code复制到一个名为postfile.py的本地文件中

【讨论】:

    猜你喜欢
    • 2016-07-03
    • 2018-01-18
    • 1970-01-01
    • 1970-01-01
    • 2016-11-09
    • 2019-05-30
    • 1970-01-01
    • 2015-01-19
    • 2020-09-03
    相关资源
    最近更新 更多