You are doing the wrong thing. You just need to add two lines as mentioned in a thread that I shared.
But leave all that. Just get a clean copy of your assignment and do all the code again. Here is the guide on how to get a fresh copy of your assignment.
And if you wish, you may download your notebook, before getting a fresh copy, and then get a fresh copy and then copy the code carefully from the old notebook and paste it into the new notebook. But make sure you only copy the code which you’ve written and don’t change anything else.