I have a MySQL stored procedure called test which accepts one argument. I can execute the stored procedure from python 2.7x using below code
data='Teststr'
cur = db.cursor()
cur.execute("CALL test('{0}')".format(data))
But when I use
data='Teststr'
cur = db.cursor()
cur.callproc('test',data)
I am encountering
OperationalError: (1318, 'Incorrect number of arguments for PROCEDURE MyDb.test; expected 1, got 7')
Looks like python treats each character as one argument. What am I missing here?