try:
cur.execute(
"INSERT OR IGNORE INTO Book (name_id, author_id, publish_year) VALUES ( ?, ?, ? )",
(int(str(book_id).rstrip(',)').lstrip('(')), int(str(author_id).rstrip(',)').lstrip('(')), int(publish))
)
conn.commit()
cur.execute(
"SELECT name_id FROM Book WHERE name_id = \"%s\"" % book_id
)
conn.commit()
current_book = cur.fetchone()