Attached minimal Jupyter notebook (strip ".txt"), given the following two commands, applied in series, results in the following error:
$ jupytext --to py error\ example2.ipynb
$ jupytext --test --update --to ipynb error\ example2.py
Traceback (most recent call last):
File "/home/user/testing/venv/bin/jupytext", line 11, in <module>
sys.exit(jupytext())
File "/home/user/testing/venv/lib/python3.5/site-packages/jupytext/cli.py", line 129, in jupytext
preserve_outputs=args.update)
File "/home/user/testing/venv/lib/python3.5/site-packages/jupytext/cli.py", line 38, in convert_notebook_files
test_round_trip_conversion(notebook, ext, preserve_outputs)
File "/home/user/testing/venv/lib/python3.5/site-packages/jupytext/compare.py", line 88, in test_round_trip_conversion
test_outputs=True)
File "/home/user/testing/venv/lib/python3.5/site-packages/jupytext/compare.py", line 65, in compare_notebooks
ref_cell = filtered_cell(ref_cell, preserve_outputs=test_outputs)
File "/home/user/testing/venv/lib/python3.5/site-packages/jupytext/compare.py", line 16, in filtered_cell
filtered['execution_count'] = cell['execution_count']
KeyError: 'execution_count'
Jupytext 0.6.5
Thanks @kernc for reporting this. This is very useful. Let me try to turn your example into an additional test...
The fix is on branch v0.7.0, but that branch is not stable yet, so I do not recommend that you use it now. Please wait a few more days before I can release it... Thanks
A prerelease is available. Try it with:
pip install jupytext==0.7.0rc0
Verified works great. Thanks!
Most helpful comment
The fix is on branch v0.7.0, but that branch is not stable yet, so I do not recommend that you use it now. Please wait a few more days before I can release it... Thanks