开发者社区 问答 正文

python插入数据报错了?报错

conn.executemany(sql, tmp)
  File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 218, in executemany
  File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
TypeError: not all arguments converted during string formatting
 

展开
收起
爱吃鱼的程序员 2020-06-08 15:33:20 595 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    sql语句的参数不对

    类型错误

    TypeError:notallargumentsconvertedduringstringformatting

    没有足够的参数

     File"build/bdist.linux-x86_64/egg/MySQLdb/connections.py",line36,indefaulterrorhandler
    LookupError:unknownencoding:utf8mb4


    这个怎么解决,诸位大神?

    把代码贴上来

    2020-06-08 15:33:37
    赞同 展开评论