使用python代码想将Excel表格里的数据直接存入数据时,却在连接数据库时报出这样的错误:TypeError: __ init __() takes 1 positional argument but 5 positional arguments (and 1 keyword-only argument) were given
不知道是为啥吧,我把参数名加上,然后就得行了
db = pymysql.connect(
host='localhost',
user='root',
passwd='123456',
db='test',
port=3306,
charset='utf8'
)