首页 > 其他 > 详细

TypeError: 'dict' object is not callabled

时间:2015-12-25 17:02:13      阅读:934      评论:0      收藏:0      [点我收藏+]
Traceback (most recent call last):
  File "/root/Desktop/JuniperBackdoor-master/censys.py", line 13, in <module>
    for name, series in res.json()["raw_series"].iteritems():
TypeError: dict object is not callable

技术分享

I just upgraded requests. The version in (current) Debian Stable is ancient.
"Upgrade requests and it works!"
In conclusion:
1.Upgrade your version of requests (pip install -U requests)
2.Make sure your URL returns valid JSON

requests版本太旧,该升级啦(Debian):pip install -U requests

不想升级的话,要写成xx.json的形式,而不能写成xx.json()这种形式,建议升级requests

参考连接:http://stackoverflow.com/questions/14543570/how-to-print-a-variable-with-requests-and-json

TypeError: 'dict' object is not callabled

原文:http://www.cnblogs.com/homeways/p/5076134.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!