Notebook are not saving in ArcGIS Pro

907
10
01-04-2024 12:16 PM
DavidAnderson_1701
Occasional Contributor

This is not exactly an API question but I figured this question has a better chance of being answered here than in the general ArcGIS Pro forum.

Today for the third time, I opened up a Pro project, went to open the notebook, where all of the code I had written the last time I was working on the project was gone.  IE, the notebook did not save my work, despite using the save button frequently.  No checkpoints were created.  Essentially a days worth of work was lost.

I did get a message that  New Notebook.ipynb could not be found in a directory that was not the project directory.  

As I said, this is the third time this has happened.   Has anyone else experienced having Jupyter notebooks inside the Pro environment not be saved?

0 Kudos
10 Replies
David_McRitchie
Esri Contributor

Hey David,

Sorry to hear, that is an incredibly frustrating issue to get. I have not seen this before but I suspect that it might be depending on how the notebooks are stored on your device. Can I just confirm if you are using a shared drive and if you can find the .ipynb file when searching via the Windows File Explorer?

Many thanks,

David

Esri UK -Technical Support Analyst
0 Kudos
DavidAnderson_1701
Occasional Contributor

The work was done on a local drive.  The ipynb file can be see in File Explorer, being located in the ArcGIS Pro project folder.

0 Kudos
D_McRitchie
New Contributor II

Thanks for getting back to David. In that case, I believe the notebook should be accessible and will require you to add the folder connection again in ArcGIS Pro then reopen the notebook.

Hopefully that is the case, but if not then please let me know.

David

0 Kudos
DavidAnderson_1701
Occasional Contributor

Hi, the issue is not accessing the notebook.  The issue is that I do work in a notebook, saving frequently, close the Pro project for the day (saving it also), open the project the next day, open the notebook, go to resume the work I have done but I can't because the notebook has not saved the prior work.

0 Kudos
David_McRitchie
Esri Contributor

Hey David,

That is odd behavior. It would be interesting to know if the notebook file displays the correct modified date when you save it.

Could you try testing this again and navigating to where the .ipynb file is stored in File Explorer then checking that the date and time are aligned to when you saved the notebook? It would also be worth trying this on a new drive, especially if the notebooks are being loaded in from a cloud store.

Many thanks,

David

Esri UK -Technical Support Analyst
0 Kudos
AbeCoughlin
Occasional Contributor III

I had a similar issue last week. The notebook was actually saving but not showing when I re-opened the project - I could see the notebook file in Windows Explorer, but it wouldn't open in Pro, it simply created a new notebook each time.

As I was running it on a server machine (our go-to machine for heavy processing) I thought that possibly it was a permissions issue that I had to discuss with IT. As yet, I haven't done that.

I could open the notebook directly by clicking on the file in Windows Explorer - this would open the notebook in either the browser (via the notebook server) or in VSCode.

I'm on 10.9.1, both Pro and Enterprise.

A_Schwab
New Contributor III

Were you saving it by saving the Arc Pro project or the save button inside the notebook?

Saving the ArcPro project stupidly doesn't save the notebook content - you need to do that in the notebook to make sure the content is saved.

AbeCoughlin
Occasional Contributor III
Great question and great observation!
I'll have to revisit my project, but you're probably spot on - I was probably just saving the project which one would think would also save the notebook.
Thanks!!!
Abe.
0 Kudos
ShaunWalbridge
Esri Regular Contributor

I just did some light testing with Pro 3.2, and can confirm that saving the project will save the notebook without needing to separately save the notebook from the Notebook ribbon. Could you search your machine for .ipynb files and see if anything else turns up? From your description of it being missing in the project, perhaps the file was renamed or otherwise changed in a way that Pro didn't track, and the updated file is present elsewhere.

The other thing that comes to mind is if for some reason the file is stored in a read-only location, the save button won't do anything, but that case is usually pretty obvious in the UI which has this at the top:

ShaunWalbridge_0-1705425452150.png

I'm hoping the notebook is in a different location and you haven't lost work. If there is a persistent issue with notebook saving, obviously that's a bug and we can look at it.

Cheers, Shaun

0 Kudos