Reputation: 2832
In this case, this project was writen on python 3.4
, works with mysql
(especially uses pymysql
library). Getting this error while execute sql request: mysql error sql: unpack_from requires a buffer of at least 8 bytes
. It tries to execute the sql query below:
sql = """
SELECT n.name
FROM %s n
WHERE n.ID = %d """ % (globals.tbl_notification_type, notificationTypeID)
Anybody came accross simular problems?
Upvotes: 1
Views: 113
Reputation: 6065
Try to replace %d with %s:
sql = """
SELECT n.name
FROM %s n
WHERE n.ID = %s """ % (globals.tbl_notification_type, notificationTypeID)
Upvotes: 2