/*****************************************************************************************
* AttributeError: 'dict_values' object has no attribute 'translate'
* 说明:
* 由于目前使用的是Python3,在解读MySQL的ORM库的时候,结果直接遇到这个错误。
*
* 2016-10-13 深圳 南山平山村 曾剑锋
****************************************************************************************/ 一、参考文档:
. Get: TypeError: 'dict_values' object does not support indexing when using python 3.2. [duplicate]
http://*.com/questions/17431638/get-typeerror-dict-values-object-does-not-support-indexing-when-using-python 二、解决方法:
return Database.execute(insert, self.__dict__.values())
to
return Database.execute(insert, list(self.__dict__.values()))
相关文章
- AttributeError: 'LoginForm' object has no attribute 'is_bound' , object has no attribute 'is_bound'
- flask_route错误:AttributeError: 'function' object has no attribute 'route'
- Python基础学习-'module' object has no attribute 'urlopen'解决方法
- Rasa init报错:AttributeError: type object 'Callable' has no attribute '_abc_registry'
- AttributeError type object 'deprecated' has no attribute 'ROCKY'
- AttributeError: type object 'testClass' has no attribute 'testMothod'
- zc.buildout构建项目时报错‘AttributeError: '_NamespacePath' object has no attribute 'sort'’
- facenet pyhton3.5 训练 train_softmax.py 时报错AttributeError: 'dict' object has no attribute 'iteritems'
- Python - celery 相关报错 - AttributeError: type object '_multiprocessing.win32' has no attribute 'WAIT_OBJECT_0'
- httplib:AttributeError: 'module' object has no attribute 'HTTPConnection'