AttributeError: 'dict_values' object has no attribute 'translate'
/*****************************************************************************************
* 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://stackoverflow.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: 'dict_values' object has no attribute 'translate'的更多相关文章
- AttributeError: 'dict' object has no attribute 'encode'
首先这是一个很简单的 运行时错误: 错误分析: AttributeError:属性错误,造成这种错误的原因可能有: 你尝试访问一个不存在的属性或方法.检查一下拼写!你可以使用内建函数 dir 来列出存 ...
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...
- AttributeError: 'list' object has no attribute 'write_pdf'
我在可视化决策树,运行以下代码时报错:AttributeError: 'list' object has no attribute 'write_pdf' 我使用的是python3.4 from sk ...
- attributeError:'module' object has no attribute ** 解决办法
写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...
- AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
/*************************************************************************** * AttributeError: 'modu ...
- python3 AttributeError: 'NoneType' object has no attribute 'split'
from wsgiref.simple_server import make_server def RunServer(environ, start_response): start_response ...
- 对于AttributeError: 'Flask' object has no attribute 'cli'的解决办法
版权声明:本文为博主原创文章,未经博主允许不得转载. 环境flask-script2.0.5.flask0.10.1 运行官方文档sample 出现问题 c:\kk\flask\examples\fl ...
- AttributeError: 'module' object has no attribute 'Thread'
$ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last): File "th ...
- 解决window7 x64位Anaconda启动报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
随机推荐
- BZOJ3888 [Usaco2015 Jan]Stampede
我们只要把每头牛开始遮挡视线和结束遮挡视线的时间点都搞出来就好= = 再按照y轴排序...然后变成线段覆盖了..线段树搞一下就好了? /******************************** ...
- InitializeComponent System.StackOverflowException
因为一直重复调用了InitializeComponent,WPF报System.StackOverflowException错误,提示死循环似的调用.经过一阵排查得出下面结论: 避免在隐藏代码中使用O ...
- Android 浮动搜索框 searchable 使用(转)。
Android为程序的搜索功能提供了统一的搜索接口,search dialog和search widget,这里介绍search dialog使用.search dialog 只能为于activity ...
- 转: html表单中get方式和post方式的区别
1.Get是用来从服务器上获得数据,而Post是用来向服务器上传递数据. 2.Get将表单中数据的按照variable=value的形式,添加到action所指向的URL后面,并且两者使用“?”连接 ...
- flash背景透明兼容ie火狐
<embed src="1234.swf" quality="high" type="application/x-shockwave-flash ...
- HDOJ 1754 I Hate It 线段树 第二题
I Hate It Problem Description 很多学校流行一种比较的习惯.老师们很喜欢询问,从某某到某某当中,分数最高的是多少.这让很多学生很反感. 不管你喜不喜欢,现在需要你做的是,就 ...
- SpinEdit
用code给value赋值会触发 change事件
- 【C语言学习】-05 二维数组、字符串数组、多维数组
⼆二维数组.字符串数组.多维数组
- Spring学习笔记之Bean的实例化
一.bean的实例化方法有3种, 1.构造器实例化 2.静态工厂方法实例化 3.实例工厂方法实例化 二.用构造器来实例化 <bean id="ShunDao" class=& ...
- 学好C++必须要注意的十八个问题
转自 http://blog.chinaunix.net/uid-7396260-id-2056691.html 一.#include "filename.h"和#i nclud ...