Failed to load notebook

18451
62
11-28-2022 10:10 AM
TylerT
by
Frequent Contributor

I am getting this error upon any new or existing notebook open, within any project.  It's a global issue.  Any ideas how to fix?  The error starting occurring upon upgrade to version 3.0.2.

TylerT_0-1669658877436.png

Thank you.  Tyler

ArcGIS 3.0.2

 

Tags (3)
62 Replies
HannesZiegler
Esri Contributor

Interesting, to confirm that is the cause of notebooks not loading, can you try running a notebook from a local path?


Also, are you able to upgrade to Pro 3.0.3 (just in case that resolves your issue)?

Thanks,

0 Kudos
TylerT
by
Frequent Contributor

No dice running from C: drive.  Upgrading is easier said than done.  I'll give that a try when allowed.  Thx.

0 Kudos
HannesZiegler
Esri Contributor

Okay, that rules out UNC paths causing an issue.

So far it looks like this is an issue with your particular setup and not Pro.

Does your organization have a strict firewall policy? Check if it is blocking localhost in any way, in particular make sure it is not blocking traffic through localhost:8778. This is the default used by notebooks in Pro.

Besides this, let me know if upgrading to Pro 3.0.3 resolves your issue.

0 Kudos
ZacharyUhlmann1
Frequent Contributor

@TylerT Did you try this?  Specifically, create a brand new project (map, whatever is quickest).  Then make a Notebook.  Do this all on your hard drive.  Save the project, close and reopen.  Are you still encountering the same error with the one-off Notebook you just created?  If that works, seems @HannesZiegler Network troubleshooting may help isolate the issue.  

0 Kudos
ShaunWalbridge
Esri Regular Contributor

I believe this issue was caused by recent changes that went into the Pro 3.1 release affecting custom environments. You can address them on a 3.0 machine (any version) by adding the `pro-notebook-hotfix` package to your environment which correctly pins the notebook dependencies. You can also fix this by upgrading to the recently released Pro 3.1 release, see more details here for how to fix the issue: https://community.esri.com/t5/python-documents/arcgis-notebooks-in-arcgis-pro-3-0-faq/ta-p/1196582

Cheers,

Shaun

0 Kudos
ZacharyUhlmann1
Frequent Contributor

Hi all ( @TylerT  and @HannesZiegler  ) - I just had (breifly) and resolved the same issue.  Hopefully this can help you Tyler.  As Hannes said though, you may not have a config file.  I may have created one in the past - I do not recall.  BUT, I do have one now and changing the path to our new network root in the config file fixed the issue. 

 

# c.NotebookApp.notebook_dir = r"c:\path\old_network_drive\to\dir"
c.NotebookApp.notebook_dir = r"c:\path\new_network_drive\to\dir"

 

In my case, I absolutely know what happened.  We have a cloud-based server through Box (that's a company).  Our IT just changed the base directory name, and immediately Notebooks failed to load.  My troubleshooting was initially like yours - I copied my Notebook file (.ipynb) to my hard drive and tried loading it in Pro from there.  Same result - wouldn't open. 

Perhaps try one more time to discover your jupyter_notebook_config.py file by opening the command line and entering command: jupyter --paths   - this should list a few directories.  Mine was in c:\Users\myprofile\.jupyter.  The config file was located there.

Also note that I recently "upgraded" from 2.9 to 3.02 and did NOT encounter this issue.  

Hope that helps.

Zach

TylerT
by
Frequent Contributor

@ZacharyUhlmann1, Thank you.  I checked again and had no luck finding the jupyter_notebook_config.py file.  When you say you have one now, are you suggesting that I create one for the fix?

Tyler

0 Kudos
ZacharyUhlmann1
Frequent Contributor

I wasn't...but maybe?  A few thoughts: 1) So same problem still? 2) are you able to open the .ipynb files in a text editor? For instance, PyCharm was able to open my Notebooks with proper formatting. So I know the file itself was fine.  3) My issue was 100% a path on the config file. I don't know enough about Jupyter, but in my case the path in config file was no longer in existence.  Did IT rearrange directories around the same time as the issue happened?

It sounds like it may be related to the upgrade, but in my case, from 2.9.5 yo 3.01 then 3.02 I had no issues.

But making a config file and checking it may not be a bad idea?  Please let me know what you find out.

0 Kudos
TylerT
by
Frequent Contributor

Can somebody share the entire contents of their config file?  Thank you.

ZacharyUhlmann1
Frequent Contributor

Hi @TylerT  my config file is 1300 lines.  Almost certain it was autogenerated using the command line command explained here: https://jupyter-notebook.readthedocs.io/en/stable/config_overview.html 

In my initial response, the code changing the c.NotebookApp.notebook_dir was what fixed it for me.  Line 393 in jupyter_notebook_config.py.  In my case, the path originally listed was no longer valid so I changed it.

0 Kudos