-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download as .ipynb returns the associated python file #118
Comments
Hello @Fubukimaru , thanks for reporting this. I am afraid that the "Download as > .ipynb" menu entry in Jupyter Notebook stands for "Download current notebook". I suggest you do the following:
Can you confirm that this fixes your issue? Note that fixing the download menu to always download the |
Hello Marc, The notebook was already pair as follows:
When opening the Then, when clicking on download, I get the Do you have any clue on what could be happening? Thanks for your support and for jupytext :)! |
Hello Alberto, I played a bit more with this. The good news is that I can reproduce the issue you report! If I click on "Download as .ipynb" when editing I think this is a side effect of merging notebook models. The I think this is also responsible for a positive side effect, which I want to preserve: Jupyter stops autosaving when the Let me have a further look at this when time permits - thanks again for reporting! |
Understood. If you require my assistance, just tell me. Thanks! |
Alberto, I have pushed a fix for this on branch 0.8.5. Would you like to test it? To install the dev version you will have to:
I will also test it myself in the next days, to make sure that it introduces no regression. |
Hello Marc, I did the testing. For the use-case it works perfectly 👍. Now when I open the .py, the .ipynb is marked as running. I can download both .ipynb and .py correctly. I'll also be testing this version. If I find any drawback, I'll report it. Thanks! |
Thanks Alberto for testing the new version so quickly! Two comments:
Let me think a bit more on how to improve the user experience on these two additional points... And be careful with the autosave meanwhile! (Turn it off by running |
About downloading: About saving: What about providing a parameter in the file's metadata to disable autosave? Does it make sense? Does it make sense with the current code? Thanks! |
Hello Alberto, sorry this is taking a bit longer than expected! I am not yet ready to deliver this, so I moved the code from branch 0.8.5 to notebook_path_is_ipynb_not_py. The latest update on this:
|
This allows to - keep the original Jupyter behavior: the opened file is the one the user did open - preserve the timestamp test. When saving, Jupyter will test all the timestamps of all formats of the paired notebook.
This allows to - keep the original Jupyter behavior: the opened file is the one the user did open - preserve the timestamp test. When saving, Jupyter will test all the timestamps of all formats of the paired notebook.
@Fubukimaru , I think I found a solution for this. The file that appears as open will now always be the one that the user did open. And I have added a check on the timestamp: when Jupyter saves a paired notebook, it first checks the timestamps of all alternative representations. Would you mind giving a try to the new release candidate, and confirm that it works as expected? Even in the case when you do not deactivate the autosave? Thanks!
|
Version 0.8.6 is now available. Thanks @Fubukimaru for reporting this. |
Thanks to you. Everything is working perfectly :). |
Hello,
When I'm on a notebook and I want to make a copy as .ipynb, I go to Download as > .ipynb, however what I get is the .py instead. Would it be possible to download the notebook instead?
I have the last version that pip gave me: 0.8.4.
Thanks!
The text was updated successfully, but these errors were encountered: