Python2.7 MySQL Connector Error on LOAD DATA LOCAL INFILE

后端 未结 4 721
我寻月下人不归
我寻月下人不归 2021-01-14 08:26

I\'m trying to dynamically load census data into a mysql database (from .csv files) using Python and MySQL Connector.

I can\'t figure out why I am getting the error

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 08:36

    You have an error when calling the execute() method:

    cursor.execute(add_csv_file, csv_info)

    try to:

    cursor.execute(query, (add_csv_file, csv_info,))

提交回复
热议问题