Jupyter Notebook - .ipynb files - opening as plain text - No longer interactive notebook - jupyter-notebook

I have a Windows 10 machine with VirtualBox, Linux Mint 18, running Jupyter Notebook.
I have successfully generated 20+ notebooks and viewed them running html, and processed still images.
I changed the viewer to view the source code of the page, and cannot figure out how to switch back to the notebook view.
Now when I click on my .ipynb files, I see the plain text, but no longer am viewing the file as an interactive Jupyter notebook.
I've tried changing the lower bar setting to JSON and HTML, but that does not seem to correct the problem.

Ahhh, Jupyter notebook was not running when I clicked on the .ipynb file.
Because the .ipynb files are stored in plain text format, Mint just opened the file as plain text, rather than giving me an error message saying "cannot open .ipynb files."
PROBLEM SOLVED

Related

Where does Jupyter Notebook save files?

So I'm just beginning my programming/coding journey. I've downloaded Anaconda and made a shortcut for Jupyter Notebook on my desktop. I tried using my first file the other day, and I'm not sure where it's being saved to. Also, I basically don't want Jupyter to save any Notebook I do once I close the Notebook, unless I specifically save it myself - I just use it for 'working out' if you like.
Here is the image showing what I mean
Like, where is that untitled.ipynb file being saved? And, how can I adjust my settings in Jupyter Notebook such that these files aren't saved and are discarded automatically so I can use them as I describe just for 'working out'?
By default the ipynb files are stored to your user profile:
C:\Users\yourlogin
How to disable autosave has already been described here:
Turn Off Autosave in IPython Notebook
I don't recommend doing that.

Problems about open .ipynb file incorrectly in PycharmI

I want use jupyter notebook in Pycharm,but when I open .ipynb file,it show as I show

How can i edit jupyter notebook from terminal without opening web browser?

How can I edit my jupyter notebook in terminal.
I just don't like to open jupyter notebook in web browser.
I google out but every answer is related to how can we open notebook from terminal directly.
I'd suggest looking at Jupytext's ability to do command line conversions back-and-forth from the notebook json structure to a python script (or markdown). If you already have the backbone of a notebook (.ipynb) file, you can convert it to .py script using jupytext --to py notebook.ipynb. That makes a text file that is easy to edit in your favorite terminal based text editor. The json in the .ipynb files is not as easy to edit directly.
Then when you are done editing, you can convert the .py script form back to a notebook with something like jupytext --to notebook notebook.py. Optionally, you can even execute it without opening a browser by adding --execute. I have an example conversion-and-execution command in use here.

How to I stop Jupyter Notebooks from creating and opening the HTML file?

Whenever I start a Jupyter Notebook, it creates and automatically opens an HTML file. How do I stop this? HTML files are opened by default on my system in my text editor, not my web browser, and my terminal allows me to click links to open them, and the link to the notebook is in the output of the command, so I don't need the link in the HTML file.
Should have thought of it first, but the help file answered the question (jupyter notebook --help):
jupyter notebook --no-browser

Repair corrupted Jupyter notebook / load previous version?

I had a hardware crash while running a Jupyter notebook. After repairing the system and trying to restart the notebook, I got the following error message:
Error loading notebook
Unreadable Notebook: D:\Eddy\Documents\1604 Udacity\1612 Self-driving car Nanodegree\P4\P4 Eduard van Kleef.ipynb NotJSONError("Notebook does not appear to be JSON: ''...",)
Does anyone know of a way to revert to any of Jupyter's previous 'checkpoints'? Or of a way to at least partially restore a JSON?
If you are lucky then the ipynb file is corrupted but still there. In that case you can try opening it in a text file and copying the contents to a new notebook. But check the size of the file. If it is zero bytes, then there is nothing there!
This actually happened to me when my server ran out of memory and somehow the notebook got completely erased. Totally sucks.
Try this
jupyter nbconvert filename.ipynb --clear-output
It worked for me since it has corrupted because of Plotly behavior with some big data.
in your file directory that contains your ipynb file there is a folder called '.ipynb_checkpoints'. this folder does not show in the jupyter application so find it through windows explorer.
inside there's will be a file called urfilenamehere-checkpoint.ipynb
copy paste it to your file directory and open through the jupyter application it should probably work.
if your corrupted file is 0B, you definitely have to rely on the checkpoints.
do not create a new notebook with the same name it will overwrite the checkpoint.

Resources