Это мой код:
sql = "INSERT INTO haircolor (x_pos, y_pos, width, height,filename,hair_color) VALUES (%s, %s, %s, %s, %s, %s)"
print ("Values",(x_pos, y_pos, width, height,filename,hair_color))
mycursor.execute(sql, (x_pos, y_pos, width, height,filename,hair_color))
mydb.commit()
Вывод:
Значения: 33.897543, 28.304444444444444, 2.7566544, 4.9043634, '1 (copy1) .jpg ,
black`
Ошибка
Ошибка обработки параметров формата python 'str_' не может быть преобразован в тип mysql