AttributeError: 'dict' object has no attribute 'iteritems'
程序员文章站
2022-04-14 09:31:27
...
Python3.5中:iteritems变为items
这就导致了android 源码编译不过
- 环境 androidN
- 文件
build/tools/post_process_props.py
#!/usr/bin/env python
...........
buildprops = prop.to_dict()
for key, value in buildprops.iteritems():
就会在这里报错
由于usr/bin/env python 指向的是 /usr/bin/python
而 /usr/bin/python 是 /usr/bin/python3.5的软链接
所以我们需要修改/usr/bin/python 是 /usr/bin/python2.7的软链接
linux 下有个工具可以直接将python2.7的内容转换为Python3.5的 2to3
推荐阅读
-
python错误:AttributeError: 'module' object has no attribute 's
-
python编程排除163邮箱发送邮件报错(AttributeError: ‘tuple‘ object has no attribute ‘encode‘)
-
python编程排除163邮箱发送邮件报错(AttributeError: ‘tuple‘ object has no attribute ‘encode‘)
-
AttributeError: module ‘community‘ has no attribute ‘best_partition‘ 问题解决方法
-
【python】解决AttributeError: module ‘scipy.misc‘ has no attribute ‘toimage‘问题
-
【Tensorflow】Linux下Tensorflow报错:AttributeError: module ‘tensorflow‘ has no attribute ‘xxxx‘
-
AttributeError: 'module' object has no attribute 'main'
-
AttributeError: module 'sklearn' has no attribute 'linear_model'
-
解决Keras报错AttributeError: 'NoneType' object has no attribute 'inbound_nodes'
-
解决'DataFrame' object has no attribute 'sort'