Jupyter Notebooks are a third-party tool that some Coursera courses use for programming assignments.
You can revert your code or get a fresh copy of your Jupyter Notebook mid-assignment. By default, Coursera persistently stores your work within each notebook.
To keep your old work and also get a fresh copy of the initial Jupyter Notebook, click File, then Make a copy.
We recommend keeping a naming convention such as “Assignment 1 - Initial” or “Copy” to keep your notebook environment organized. You can also download this file locally.
Refresh your notebook
- Rename your existing Jupyter Notebook within the individual notebook view
- In the notebook view, add “?forceRefresh=true” to the end of your notebook URL
- Reload the screen
- You will be directed to your home Learner Workspace where you’ll see both old and new Notebook files.
- Your Notebook lesson item will now launch to the fresh notebook.
If you see a “Control Panel” button in your course:
- Click Control Panel, then click My Server
- Find the name of your previous file, as well as the new copy of your file
- Delete the original notebook file (not the copy) by selecting the checkbox next to the filename, then clicking the trashcan icon that appears.
- Click Control Panel, then click Stop My Server
- Select “My Server” to restart.
- After a few minutes, launch the notebook again from your Course Home. If you get a 404 error while the notebook server restarts, wait a few minutes and try again.
- After the restart is complete, you will see a fresh copy.
Find missing work
If your Jupyter Notebook files have disappeared, it means the course staff published a new version of a given notebook to fix problems or make improvements. Your work is still saved under the original name of the previous version of the notebook.
To recover your work:
- Find your current notebook version by checking the top of the notebook window for the title
- In your Notebook view, click the Coursera logo
- Find and click the name of your previous file
"Kernels" are the execution engines behind the Jupyter Notebook UI. As kernels time out after 10 minutes of notebook activity, be sure to save your notebooks frequently to prevent losing any work. If the kernel times out before the save, you may lose the work in your current session.
How to tell if your kernel has timed out:
- Error messages such as "Method Not Allowed" appear in the toolbar area.
- The last save or auto-checkpoint time shown in the title of the notebook window has not updated recently
- Your cells are not running or computing when you “Shift + Enter”
To restart your kernel:
- Save your notebook locally to store your current progress
- In the notebook toolbar, click Kernel, then Restart
- Try testing your kernel by running a print statement in one of your notebook cells. If this is successful, you can continue to save and proceed with your work.
- If your notebook kernel is still timed out, try closing your browser and relaunching the notebook. When the notebook reopens, you will need to do "Cell -> Run All" or "Cell -> Run All Above" to regenerate the execution state.
Download and save Jupyter Notebooks
You can download and save your Jupyter notebooks on your computer by following the instructions here.