TypeError: coercing to Unicode: need string or buffer, float found

御命丹心君奉天 2018-05-27 02:15:27
大神帮忙看下
insert语句:
insertSql += "insert into t_monitor_log (majorid, userid, time, ip, equipment, operation_code, courseid, objectid, duration, send_status) values"
insertSql += "(36, '" +users[getIndex()]+ "', '"+getTime()+"', '218.75.206.106', 'computer', '13040028', '0', '"+code+"','"+str(getDuration())+"',0);\n"
报错:
insertSql += "(36, '" +users[getIndex()]+ "', '"+getTime()+"', '218.75.206.106', 'computer', '13040028', '0', '"+code+"','"+str(getDuration())+"',0);\n"
TypeError: coercing to Unicode: need string or buffer, float found
...全文
1289 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
oyljerry 2018-05-27
  • 打赏
  • 举报
回复
str(36)。转成字符串再想加

37,743

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧