报错内容:提示没有iteritems属性
AttributeError: 'dict' object has no attribute 'iteritems'
翻译过来是:
属性错误:“dict”对象没有属性“iteritems”
原因在于:python3中已经没有 “iteritems” 这个属性了,现在属性是:“ items ” 。
当然,如果你使用的是以前的Python版本,不会出现这个错误。
解决方案
将代码中的iteritems 修改为:items
报错内容:提示没有iteritems属性
AttributeError: 'dict' object has no attribute 'iteritems'
翻译过来是:
属性错误:“dict”对象没有属性“iteritems”
原因在于:python3中已经没有 “iteritems” 这个属性了,现在属性是:“ items ” 。
当然,如果你使用的是以前的Python版本,不会出现这个错误。
解决方案
将代码中的iteritems 修改为:items