add the try and except, so that it will skip the duplicate entries