Jupyter Notebook not syncing with PyCharm

Suppose I am creating a .ipynb in PyCharm and then running the IPython Notebook core. Then, if I change the notebook in the browser, how do I revert the changes back to PyCharm?

There is a "synchronize" function when I right click on the filename in PyCharm, but doesn't seem to do anything.

+3


source to share


3 answers


Try to save using breakpoints. You can always jump to the last checkpoint added.



0


source


In your browser go to "File", select "Save" and "Checkpoint". A window should appear that says: "The notebook file has changed on disk since the last time it was opened or saved. Do you want to overwrite the file on disk with the open version or load the version to disk (reload the page)?"



Then click "overwrite" and the changes will be overwritten to a file on your computer. Apparently syncro is not realtime (I assume this is a bug since the window appears in pycharm but seems useless), if you have ipynb open you have to close and reopen it to see the update.

0


source


One possible solution:

  • After starting the Jupyter server startup, make sure the file edited through Jupyter is closed in Pycharm
  • Save Jupyter Notebook: Save and Checkpoint Method
  • In Pycharm, sync your laptop
  • Now the laptop can be opened and the changes will appear

My guess is that the reason for the error is that while the notebook is open, it is pycharm, pycharm edits it and overwrites at any time the modifications made by the jupyter server. However, this is only speculation, I am not sure about the origin of this behavior.

0


source







All Articles