I was trying to run the full code to see if I could replicate and get the following error. I…