/*****************************************************************************************
* 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'的更多相关文章

  1. AttributeError: 'dict' object has no attribute 'encode'

    首先这是一个很简单的 运行时错误: 错误分析: AttributeError:属性错误,造成这种错误的原因可能有: 你尝试访问一个不存在的属性或方法.检查一下拼写!你可以使用内建函数 dir 来列出存 ...

  2. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  3. AttributeError: 'list' object has no attribute 'write_pdf'

    我在可视化决策树,运行以下代码时报错:AttributeError: 'list' object has no attribute 'write_pdf' 我使用的是python3.4 from sk ...

  4. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

  5. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

  6. python3 AttributeError: 'NoneType' object has no attribute 'split'

    from wsgiref.simple_server import make_server def RunServer(environ, start_response): start_response ...

  7. 对于AttributeError: 'Flask' object has no attribute 'cli'的解决办法

    版权声明:本文为博主原创文章,未经博主允许不得转载. 环境flask-script2.0.5.flask0.10.1 运行官方文档sample 出现问题 c:\kk\flask\examples\fl ...

  8. AttributeError: 'module' object has no attribute 'Thread'

    $ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last):  File "th ...

  9. 解决window7 x64位Anaconda启动报错:AttributeError: '_NamespacePath' object has no attribute 'sort'

    最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...

随机推荐

  1. K2工作流的使用

    K2的工作流作为工作流中的战斗机,被各大企业争相抢购着,当然我们公司也买了,用起来确实方便也的确很强大. 主要分两的模块: 一.K2.net 2003 Service Manager 以上是对配置用户 ...

  2. ajax简单封装

    var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); ...

  3. Windows Store App 用户库文件操作

    (1)获取用户库位置 如果想要通过应用程序在用户库中创建文件,首先需要获得用户库中指定的位置,例如图片库.文档库等.这里值得注意的是,在获取用户库的位置之前,必须在Windows应用商店项目的清单文件 ...

  4. YanYan Self Introduction

      My Website: http://finehappy.com/

  5. spring的bean管理

    1.所有的类都可以交给Spring管理 2.如何把一个类交给bean管理? (1)配置applicationContext.xml (2)在xml中写入bean节点配置要交给bean管理的类 3.程序 ...

  6. submit回车提交影响

    $(".bInput").bind('keydown',function(event){//回车提交手动标签 if(event.keyCode==13){              ...

  7. Oracle实现自增方式:序列+触发器

    Oracle不能像MySQL那样设置主键自增,Oracle用 <序列+触发器>的方式使数据表的一列或多列实现自增 序列sequence+触发器trigger:实现数据表S_DEPART中的 ...

  8. Oracle 11g 安装

    1.Oracle 11g安装: http://www.cnblogs.com/qianyaoyuan/archive/2013/05/05/3060471.html 2.安装完Oracle数据库,给s ...

  9. jsp中JavaBean的用法

    UserRegisterBean.java:这是JavaBean package JavaBean; public class UserRegisterBean { private String us ...

  10. Deployment failed due to an error in FastDev assembly synchronization.

    在编译的时候发生Assembly synchronization error,显示信息为:Deployment failed due to an error in FastDev assembly s ...