mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

saving notebook does not modify paired py file #1130

Open richardehughes opened 1 year ago

richardehughes commented 1 year ago

I paired the notebook with the ipynb using: jupytext --set-formats ipynb,py:percent *.ipynb

I then edit the ipynb. When I save my changes to the ipynb, the paired .py file is not modified. I thought that the mods to the ipynb would be saved to the .py. Is this not the case?

I am using jupytext version 1.15.2

This is my notebook metadata: { "jupytext": { "formats": "ipynb,py:percent" }, "kernelspec": { "name": "my_py3p9", "display_name": "my_py3p9", "language": "python" }, "language_info": { "name": "python", "version": "3.9.13", "mimetype": "text/x-python", "codemirror_mode": { "name": "ipython", "version": 3 }, "pygments_lexer": "ipython3", "nbconvert_exporter": "python", "file_extension": ".py" } }

mwouts commented 1 year ago

Hi @richardehughes , thank you for reporting this.

Can you tell us more about how you edited the ipynb notebook?

You will have to use either Jupyter Lab or Notebook. Also you need to make sure that 1. Jupytext is installed in the Python environment that provides Jupyter and 2. That you restart your Jupyter server after installing Jupytext. You should see a mention of Jupytext being activated in the Jupyter logs.