zoukankan      html  css  js  c++  java
  • 项目运行报错query = query.encode('utf-8').decode(errors='replace')

    打开D:ProgramDataAnaconda3Libsite-packagesdjangodbackendsmysqloperations.py文件 

    def last_executed_query(self, cursor, sql, params):
            # With MySQLdb, cursor objects have an (undocumented) "_executed"
            # attribute where the exact query sent to the database is saved.
            # See MySQLdb/cursors.py in the source distribution.
            query = getattr(cursor, '_executed', None)
            if query is not None:
                query = query.encode('utf-8').encode(errors='replace')
            return query

    将if query is not None:
                query = query.encode('utf-8').encode(errors='replace')

    注释掉

  • 相关阅读:
    setsid
    dup
    信号量
    linux标准输入输出
    linux守护进程范例
    c++字符串操作
    浏览器缓存
    bfc
    苹果手机自制铃声
    vue-cli 源码解读
  • 原文地址:https://www.cnblogs.com/qianzf/p/14097388.html
Copyright © 2011-2022 走看看