Help! My Notebook will not open!

Hello,

While I was solving the programming assignment 1 of week 1 of this course (Course 4), I created a cell in order to keep the page from timing out:
for i in range(2000000000):
for j in range(2000000000):
print()
I did this because I had to go out for some urgent work and so had to leave the assignment midway. But I knew that it times out, so I did not want that to happen. However, when I came back, then I found this message upon reloading:


I tried to go to the next assignment and see if I could get help from the standard instructions part which is included at the start of each assignment:

When I click on the instructions link, it simple redirects to the home page of the course:

Please help me. I cannot proceed and if this issue does not resolve I’ll not have my certificate!

1 Like

Hello,

I am happy to share that I have solved the issue.

Firstly, I searched google and ended up at this post:

Unfortunately that didn’t solve the issue. But importantly, it gave me an idea. As you can see, Paul says to click on the ‘?’ button at the top right corner of the notebook. What happens after that is that you get an opion to get the latest version. But even on doing that I was unable to solve the issue. So here’s what I did:

  1. I reloaded the errored-out notebook

  2. Importantly, before the page fully reloaded, as soon as the headers appeared at the top of the page, the “jupyter” icon appears. I immediately clicked on it. This is because if the page reloads fully, then the error occurs and the icon goes away.
    image

  3. On clicking that jupyter icon I came to this page
    image

  4. I clicked on releases
    image

  5. Then W1A1


    I had redone the whole experience so that I could share with you all the steps of how I solved it. So, it shows only around 30 MB. But for the first time when I saw the issue, it was close to 200 MB! No wonder the crashing issue.

  6. So next I clicked on it and downloaded it.

  7. I opened it in a text editor (VS Code)
    image

  8. Now just delete the code which caused the problem. Also keep in mind to delete the output as well:
    image

  9. Select the bad notebook from coursera and delete it:

  10. Now upload modified file back


    You can see that it has returned to its normal size.

I decided to open this post as when I stumbled upon the issue I thought I need help and fast! However, I searched around and by God’s grace thought in the way I did. Since I did not find a similar solution like the one above, I decided to write about it.

Hopefully it helps someone who committed the same mistake.
Lesson: start an assignment only if you are sure you can stay for the whole duration. Or, just accept the timeout and reload the thing.

As far as reloading is concerned, it is just a click away:
Suppose you left here:


Click on Run All Above:
image
And all cells above the current one get run without having to press shift+enter repeatedly.

Hope this helps in the future.

Thanks,

Sushant

1 Like

Whew, that was a lot of effort to go through, but it’s good you were able to get back to a working state. Please note that the original idea of creating that huge nested loop was just unnecessary. You can always restart the notebooks if they time out. Just do:

Kernel -> Restart and Clear Output
Cell -> Run All

Or Cell -> Run All Above as appropriate. It frequently happens that if you ignore that browser tab for a while, it will no longer be active, but it’s easy to restart it.

4 Likes