AttributeError: 'NoneType' object has no attribute 'encoding'

矫情吗;* 2023-07-05 14:56 178阅读 0赞

python连接mysql
AttributeError: ‘NoneType’ object has no attribute ‘encoding’
在这里插入图片描述

  1. do = pymysql.connect("localhost","root","testdb","test",charset='utf-8')

错误点:charset后的utf-8
j解决方法 :python3中的pymysql连接mysql时charset参数填utf8而非HTML中的charset的参数utf-8

发表评论

表情:
评论列表 (有 0 条评论,178人围观)

还没有评论,来说两句吧...

相关阅读