아미(아름다운미소)

not all arguments converted during string formatting 본문

랭귀지/python

not all arguments converted during string formatting

유키공 2018. 11. 10. 09:30
python sqlite -> MySQLdb 변환시 error
not all arguments converted during string formatting sqllite
cursor.execute("INSERT INTO image(num1, num2, filename, ext, thumbnail, image) VALUES(?, ?, ?, ?, ?, ?);" , (num1, num2, _name, _ext, _thumb, _image))
MySQLdb
cursor.execute("""
    INSERT INTO image
    (num1, num2, filename, ext, thumbnail, image) VALUES
    (%s, %s, %s, %s, %s, %s)""" , (num1, num2, _name, _ext, _thumb, _image))
Comments