zoukankan      html  css  js  c++  java
  • AttributeError: 'dict_values' object has no attribute 'translate'

    /*****************************************************************************************
     *          AttributeError: 'dict_values' object has no attribute 'translate'
     * 说明:
     *     由于目前使用的是Python3,在解读MySQL的ORM库的时候,结果直接遇到这个错误。
     * 
     *                                                       2016-10-13 深圳 南山平山村 曾剑锋
     ****************************************************************************************/
    
    一、参考文档:
        1. Get: TypeError: 'dict_values' object does not support indexing when using python 3.2.3 [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()))
  • 相关阅读:
    Hadoop学习笔记(1) ——菜鸟入门
    自己动手做个智能小车(8)[终]
    自己动手做个智能小车(7)
    自己动手做个智能小车(6)
    CSS动画
    smarty的缓冲
    smarty模板
    修改登录密码
    登录验证码
    phpcms
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/5962260.html
Copyright © 2011-2022 走看看