question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupytext should refuse to open out of date paired text representations

See original GitHub issue

Cf. Hari’s question on medium: is it safe to uninstall jupytext ?

Obviously uninstalling is safe. But reinstalling after a while may not be. As text representations have priority over ipynb file, the user that has worked on the ipynb version without jupytext will get the out of date version from the text representation, when he decides to reinstall.

To avoid such a situation (which can be solved by: closing the notebook without saving, and deleting the text file), we should check file timestamps, and refuse to load inputs from text when text seems to be out of date compared to the ipynb file.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
boazbkcommented, Sep 10, 2018

This can also be an issue if one edits the same notebook from different machines, some might have jupytext installed and some might not. I would suggest you put in the meta data of both the ipynb and text file some hash/version number that would be a more reliable way than just looking at the filesystem filestamp. When the ipynb’s version is higher than the textfile’s, it should take precedence. (Or maybe there can be some dialog to ask if they should be merged together or not, if this is feasible.)

0reactions
mwoutscommented, Jun 4, 2021

Hi @allenyllee , this is a very old issue so I won’t reopen it, but still I think we can do something for you use case - please see #799.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions - Jupytext documentation
The text representation only contains the part of the notebook that you wrote ... Please edit ( touch ) the paired .md or...
Read more >
Jupytext documentation
The text representation can be edited outside of Jupyter. ... with the above setting, Jupyter will not let you open scripts as notebooks....
Read more >
Using at the Command Line - Jupytext documentation
For programs that don't accept pipes, use {} as a placeholder for the name of a temporary file that will contain the text...
Read more >
Jupytext ChangeLog
Jupytext will not open a text notebook that is not UTF-8 (#896) ... Jupytext will not load paired notebook when text representation is...
Read more >
Paired notebooks - Jupytext documentation - Read the Docs
The text representation can be edited outside of Jupyter. ... Please note that, with the above setting, Jupyter will not let you open...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found