mwouts / jupytext

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

Suggested command for enabling multiline comment as markdown cells raises error #808

Open githubpsyche opened 3 years ago

githubpsyche commented 3 years ago

In the formats sections, to enable multiline comments as markdown cells, it's recommended to use the bash command:

jupytext --update-metadata '{"jupytext": {"cell_markers": "\"\"\""}}' notebook.ipynb --to py:percent

When I run this for an arbitrary notebook, I get the following error:

jupytext: error: argument --update-metadata: invalid loads value: 'jupytext: {cell_markers: """}'

I'm using miniconda within Windows 10 as my terminal. Other jupytext commands work just fine.

mwouts commented 3 years ago

I see... This is caused by your interpreter, that has transformed the argument {"jupytext": {"cell_markers": "\"\"\""}} into jupytext: {cell_markers: """}, which is not a valid JSON string.

I remember discussing that problem in a previous issue, do you think you could do some research in the past issues?