Wrong cell separation when creating .ipynb from .py
See original GitHub issueLet’s say I work in a notebook file, paired to a .py
file, and write one function per cell.
When I re-generate the .ipynb
notebook from the .py
file I have noticed that some functions now live in the same cell.
This is best illustrated by the images below. The following code:
becomes, after regenerating the .ipynb
from the paired .py
:
The problem does not impact all functions/cells. I’ve inspected the code in the .py
file and cannot find any obvious difference between the impacted cells/functions and the non impacted ones.
I’m using jupytext version 1.4.0
but had noticed this behaviour on previous versions too.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
collapse cell in jupyter notebook - python - Stack Overflow
I want the function to remain executed and callable, yet I want to hide / collapse the cell in order to better visualize...
Read more >Notebook formats - Jupytext documentation - Read the Docs
In the Markdown format, markdown cells are inserted verbatim and separated with two blank lines. If you'd like that cell breaks also occurs...
Read more >Refactoring a Jupyter notebook into a maintainable pipeline
Open pipeline. ipynb in Jupyter and run it from top to bottom (ensure you turn sample=False to use the entire dataset). Then, on...
Read more >Jupyter Notebook Users Manual.ipynb - Bryn Mawr College
Go to this section for more information on how to create a slideshow out of your Jupyter ... By default, Jupyter Notebooks' Code...
Read more >The Jupyter Notebook Interface - Problem Solving with Python
Note that the file extension .ipynb is not printed in the file name field, ... Headings are created in markdown cells using the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Glad to hear this was fixable - thanks for doing so so quickly!
What was happening is that the parser was seeing
"""
twice in the quadruple quote… You won’t have this issue any more in the next release.