I can't figure out what I'm doing wrong with this insert statement. The error I'm getting is:
"Failed processing format-parameters; %s" % err)
mysql.connector.errors.ProgrammingError: Failed processing format-parameters;
'MySQLConverter' object has no attribute '_navigablestring_to_mysql'`
The specific lines of code are:
update = '''INSERT INTO myDB.newtable (ID,Record,Latitude,Longitude,code) VALUES (%s,%s,%s,%s,%s)'''
cursor2.execute(update,(ID,Record,Latitude,Longitude,code))
cnx2.commit()
I have also tried this format:
update = ("INSERT INTO myDB.newtable (ID,Record,Latitude,Longitude,code) VALUES (%s, %s, %s, %s, %s)")%(ID,Record,Latitude,Longitude,code)
cursor2.execute(update)
and get this error:
mysql.connector.errors.ProgrammingError: 1054 (42S22): Unknown column '45676kb' in 'field list'.
45676kb is only a portion of the entire value. The complete string is 45676kb-98734-98734-123nn.
I think the syntax of the second attempt is more correct, because I'm at least getting an sql error but I can't figure out how to properly format my insert statement with mysql.connector.
ID,Record,Latitude,Longitudeandcodevalues?b8a0-4f8fe47a3e82, 4305-bd9d-5cf48c46c0c5, 38.922220, -77.205000, GS05