PyMySQL TypeError: not enough arguments for format string

主要是在Python的function中写了执行SQL的语句,SQL条件中需要类似'%_aa'%的匹配符号,Python认为%是求模运算或者格式化字符,而是实际我们在SQL中需要%,此时需在SQL使用%%表示。

python3 pymysql 'latin-1' codec can't encode character 错误 问题解决

https://blog.csdn.net/wanglingxxx/article/details/52049278

猜你喜欢

转载自www.cnblogs.com/yum777/p/12218334.html