For a while now, I've been happily exporting a Python executable of my Jupyter notebook by running
jupyter nbconvert --to script notebook.ipynb
which creates notebook.py
. OK, actually, I've been executing
!jupyter nbconvert --to script $s_script_path
from inside the notebook, but that shouldn't be any different.
Today, suddenly, the same command runs and produces a file notebook.txt
instead of .py
. (With minor differences, e.g., the commented lines like In[1]:
aren't there anymore.) Why would this be, and how do I get back to the other way?
P.S. This seemed to happen after I changed and re-saved the .py
file in an external editor. Can't imagine why that should make a difference, though.