1

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?

1 Answer 1

2

Try to replace %d with %s:

sql = """
    SELECT n.name
    FROM %s n
    WHERE n.ID = %s """ % (globals.tbl_notification_type, notificationTypeID)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.