My Code (Sufix is a variable):
Insert = cursor.execute("INSERT INTO bi_example (ped, pla, select) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ped = VALUES(ped);", (chunk['ped'][i], chunk['pla'][i], Sufix))
Output:
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select)