This is probably something really simple, but I am going crazy trying to figure out what I am doing wrong here. My goal: perform a simple INSERT operation using Connector/Python to communicate with my MySQL database. My code:
def insert(title, artist, img):
    conn = mysql.connector.connect(***credentials***)
    cursor = conn.cursor()
    title = title.lower().replace(' ', '_')
    path = 'img/' + title + '.png'
    sp.misc.imsave(path, img)
    add_img = ("INSERT INTO ref "
            "(song_title, artist, path) "
            "VALUES (%s, %s, %s)")
    img_data = (title, artist, path)
    # execute and commit 
    cursor.execute(add_img, img_data)
    conn.commit()
    cursor.close()
    conn.close()
This:
insert("Back in Black Live Mono", "ACDC", img)
Gives me:
ProgrammingError: 1064 (42000): 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 'references (song_title, artist, path) VALUES ('Back in'
Black Live Mono', 'ACDC',' at line 1`
The image saves successfully, but the INSERT statement is never executed. Any ideas? Thank you.
referenceswhen it no longer contains this word.references. That MySQL command must be cached or something, I'm going to restart my server and see if that fixes it..pycfiles (Python 2) or__pycache__folders (Python 3)) or you're not running the code you think you are (try adding a lineprint("test")and see if that turns up in the output).