错误信息:
ValueError: unsupported format character ‘Y’ (0x59) at index 70
产生原因:因为python执行的sql中存在类似DATE_FORMAT(MAX(CREATE_TIME), ‘%Y-%m-%d’)的写法,
其中 %Y 与 python 的参数 %s 冲突
解决方法:将 DATE_FORMAT(MAX(CREATE_TIME), ‘%Y-%m-%d’)修改为DATE_FORMAT(MAX(CREATE_TIME), ‘%%Y-%%m-%%d’)即可
参考: ValueError: unsupported format character ‘Y’ (0x59) at index 70