As alluded to by @a_horse_with_no_name, you're closing the PostgreSQL database connection, but you're not committing the transaction first.
psycopg2 opens a transaction for you if there isn't one already open. It expects you to commit this transaction when you've finished your work.
Unless you explicitly commit a transaction, closing the connection will rollback any work that's been done.
Try con.commit()
after the last copy command.