Failed to load notebook

14257
61
11-28-2022 10:10 AM
TylerT
by
Occasional Contributor III

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)
61 Replies
ShaunWalbridge
Esri Regular Contributor

When you uninstall, the installer can only remove the files that it specifically laid down. If there are newer versions, or files it didn't install, it cannot delete them. The instructions provided ensure that there isn't anything left over which falls outside the scope of what the installer can do.

 

When you create the environment with `conda create` and target packages, those packages will be downloaded from the internet independently of the installation. This differs from the normal installation process which uses `--clone` and copies the packages from the provided arcgispro-py3 environment. If there are issues with your arcgispro-py3 environment, cloning doesn't help because as you mention it will result in an equivalently corrupt environment, but creating a new environment doesn't suffer this same fate.

Cheers, Shaun

Mark_Prettyman
New Contributor III

Hello to all those who are still experiencing this "Failed to load notebooks" error, such as myself.

I have tried every iteration of Pro 3.x, including 3.0 with the hotfix, 3.1, and 3.1.1 and I cannot open a Notebook within Pro.  Jupyter Notebook works fine by itself.  I went down the rabbit hole of looking into localhost:8778 and have verified that it is not blocked.  I am on a company network behind a robust firewall, but our IT department worked with me for over 2 hours and verified that 8778 is not blocked in any way (nor is 8888).  I can install Pro 3.1 on my personal computer and open a Notebook, but a Notebook will not open on a company network.  I've even tried a Single Use License vs a Named User License, but it did not make a difference.

Can Esri explain what is happening behind the scenes when a Notebook is opened?  Is there a call to a website or server or does all the "magic" happen locally within the software and the machine on which it is installed?

TIA! - Mark

PS - this link is broken:   Clean uninstall of ArcGIS Pro - Esri BeLux 

PPS - I verified that the ip and port configuration options in jupyter_notebook_config.py are unchanged and commented out.

TylerT
by
Occasional Contributor III

Hello All, 

Update: I am the OP.  Unfortunately I have no success story to share on this matter, and am still awaiting a fix.  Like @Mark_Prettyman, I have spent many hours with IT...to no avail.  I have been without the embedded notebook for 5 months now.  Please post if you have any new solutions.  Thank you.

Tyler

ArcGIS Pro 3.1.0

0 Kudos
Mark_Prettyman
New Contributor III

Bug ID: BUG-000155019 was logged in January 2023.  Workaround suggested does not work for me.

New installations/updates to Python environment packages cause errors with notebooks. Notebooks are ...

0 Kudos
Mark_Prettyman
New Contributor III

The riddle has been solved, at least for my company. The short answer to why I could not open a Notebook in ArcGIS Pro is because of our proxy. More specifically, we have been adding User Variables of http_proxy and https_proxy to our computers’ Environmental Variables.

This was done in order for us to be able to access the AGOL via the ArcGIS Python API. It works just fine in Pro 2.9.x…but the presence of the http_proxy and https_proxy variables specifically prevents Pro 3.x from opening a Notebook. I did multiple trials and either removing these variables or having these variables with a single space allowed a Notebook to open.

Unfortunately, the ArcGIS Python API still needs to have the proxy set in order for us to connect to our AGOL, but we are able to pass that info through to the GIS() object as a variable. But, at least the mystery has been solved and we are able to use Notebooks in Pro 3.x.

TL;DR - Adding proxy settings to my Environmental Variables caused Pro 3.x to throw the "Failed to load notebook" error when trying to open a Notebook.  Deleting those variables fixed the problem.

HannesZiegler
Esri Contributor

Thank you for sharing that @Mark_Prettyman!

@TylerT@MinhazulIslam919, @Anonymous User & everyone else reading this, if you are still having problems with "failed to load notebook", please check if you also have the http_proxy and https_proxy environment variables set, then try the following:

How to configure HTTP/HTTPS proxy for iPython notebook server – Jay's Blog (jayakumar.org)

Please let me know if this resolves your issue with notebooks in Pro.

TylerT
by
Occasional Contributor III

@HannesZiegler@Mark_Prettyman

Thank you, I will try shortly, but have a few questions.

Reference Marks comment:
<snip>
TL;DR - Adding proxy settings to my Environmental Variables caused Pro 3.x to throw the "Failed to load notebook" error when trying to open a Notebook.  Deleting those variables fixed the problem.

<end snip>
1) I have no env vars for 'HTTP_PROXY' or 'HTTPS_PROXY', so any part of this applicable?

2) Are we talking about user variables or system variables?  Mark mentioned user, but want to confirm.

3) The TLDR mentions deleting env vars, while Jay's blog suggest adding user variables via startup script.  (ref: https://www.jayakumar.org/linux/how-to-configure-httphttps-proxy-for-ipython-notebook-server/).  Which is correct or better?

4) As for the proxy setting "http://proxy.example.com:80".  Is that just an "example" or is that a literal?  If that is an example what URL do I need to ask IT for?

5) Is the startup script required or can we just add env vars into win dialogue.

Much appreciated.

Tyler

ArcGIS 3.1.0

0 Kudos
Mark_Prettyman
New Contributor III

Hi @TylerT !  In my case, I had the http_proxy and https_proxy variables set in my "User variables" within the "Environmental Variables."  Here is a screenshot from one of my trials...but after I deleted the ACTUAL proxy value and just set it to a single space. 

Mark_Prettyman_0-1685106469009.png

Previously, the proxy variables were set to:  http://first%2Elast:password@wwwcompanyproxyURL:port

IF your company is using a proxy, your proxy URL would be different, but the variable might be set up similarly.  I'd definitely check with your IT to determine how your computer is configured and may be using a proxy.

BTW...my company sets the proxy automatically for browsing the internet, but we have to explicitly set it in order for ArcGIS or Conda to see outside of our network.  For example, I have the proxy set in the .condarc file just so that conda can download packages when cloning an environment.  That proxy is still set, but it does not interfere with opening a Notebook.

Once I am able to open a Notebook, here is what I use to connect to GIS():

Mark_Prettyman_1-1685107898926.png

0 Kudos
HannesZiegler
Esri Contributor

@TylerT This is only applicable if your company uses a proxy. You will need to find out the proxy URL from your company's IT folks. Unfortunately, I can't replicate this environment on my end, so I can't verify whether this is a fix or not. Here's what you'd try if your company uses a proxy:

  1. Hit windows key, type %userprofile%, press enter key. File explorer opens to your user directory.
  2. In File Explorer, navigate to .ipython\profile_default\startup.
  3. In .ipython\profile_default\startup, create 00-startup.py.
  4. In 00-startup.py put the following code:
    import sys,os,os.path
    os.environ['HTTP_PROXY']="<your proxy>"
    os.environ['HTTPS_PROXY']="<your proxy>"
    Replace <your proxy> with the URL(s) you obtain from your IT department.
  5. Now try to open a notebook in Pro. If it doesn't help, go back and delete 00-startup.py. This will put things back to exactly how they were.

 

0 Kudos
TylerT
by
Occasional Contributor III

@HannesZiegler
I'm trying to understand how the company URL has anything to do with a localhost server?  When I fire up Jupyter Lab outside of ArcGIS Pro, it runs in a localhost server.  I assumed the same occurred with ArcGIS Pro, but maybe I'm missing something.   Also, if you have a moment, can you answer all five of questions above.  Thx. 

0 Kudos