【发布时间】:2016-01-27 05:07:33
【问题描述】:
我想使用 python-owasp-zap api。我下载并安装了 python-owasp-zap 所需的所有存储库。当我运行网站https://github.com/zaproxy/zaproxy/wiki/ApiPython 中给出的示例代码时,出现以下错误,请帮助我。
Traceback (most recent call last):
File "zap2.py", line 34, in <module>
while (int(zap.spider.status()) < 100):
ValueError: invalid literal for int() with base 10: 'Does Not Exist'
然后,我尝试从状态方法中删除括号:
while (int(zap.spider.status) < 100):
print 'Spider progress %: ' + zap.spider.status
time.sleep(2)
我收到以下错误:
TypeError: Int argument must be an Int or string not an InstanceMethod
非常感谢您帮助纠正错误。
【问题讨论】:
-
它说
zap.spider.status()正在返回Does Not Exist。你需要弄清楚它为什么这样做而不是返回一个小数 -
我搞砸了我的 owasp zap api 安装,现在我得到了
IOError: [Errno socket error] [Errno 11004] getaddrinfo failed
标签: python api compiler-errors zap