Reputation: 4292
After configuring PyMySQL in Python, i fell over the issue that I cannot execute a stored procedure. cursor.callproc('storingSystemCreateCategory', 'Test12444')
returns: %d format: a number is required, not str
.
The procedure looks like:
DELIMITER //
CREATE PROCEDURE storingSystemCreateCategory(IN name VARCHAR(255))
BEGIN
INSERT INTO StoringSystem.Category(`createdAt`, `updatedAt`, `deleted`, `name`)
VALUES (CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, False, name);
END //
DELIMITER ;
I'm using http://flask-mysql.readthedocs.io/en/latest/#usage together with the setup above.
How can I execute the procedure correctly?
Upvotes: 1
Views: 303
Reputation: 479
Traceback is very important information describe where the exception came from. You must paste traceback, not only error message.
Upvotes: 1