cursor.execute(
    """
    INSERT INTO image
    (num1, num2, filename, ext, thumbnail, image) VALUES
    (%s, %s, %s, %s, %s, %s)"""
    , (num1, num2, _name, _ext, _thumb, _image))
not all arguments converted during string formatting