I cant download my notebook as .ipynb anymore it saves as JSON

I changed my computer and installed Anaconda but I cant download my notebooks as .ipynb anymore.
It only save as json.
if I try to save as .py it saves only as HTML
How can I fix it ?

You might just try chaning the file extension from *.json to *.ipynb.


@yasiss Can you share your browser and OS? I am not experiencing this issue, but other people running the same notebook on the same server are and I’m trying to isolate why.
If you’ve since resolved this, how did you?

I’ve noticed this for some time. When attempting to export a notebook as an ipynb file, the dialogue offers json format only. I can download as HTML or PDF, but not ipynb. Running Windows 10 on chrome. Same issue with Edge browser. This happens on Coursera. Could it be intentional?

nbconvert specifies application/json as the mimetype for notebooks. I was able to solve this by adding the following to my jupyter_notebook_config.py

import nbconvert
nbconvert.NotebookExporter.output_mimetype = 'application/x-ipynb+json'

Unfortunately, the configuration interface doesn’t allow access to this property so I have to change it this way. This custom mimetype acknowledges that it’s a json payload, but that json isn’t the most appropriate file extension.

I only confirmed this on Safari on macOS, but I think it should work for most other configurations which were ignoring the attachment header.

1 Like

I ran into a similar problem with one of my own extensions a few months ago with Firefox which previously worked, so it’s clearly due to a change in browser policies. I also fixed it by setting the mime-type to application/x-ipynb+json.

1 Like

Oh my! I can’t believe.

It’s a piece of cake!