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.
Thank you. Tyler
ArcGIS 3.0.2
Check the Windows Security if you are off real-time protection
Add exclusions in the antivirus software. To do so, refer to FAQ: How do I troubleshoot ArcGIS Desktop performance issues related to antivirus software (exceptions)? and relaunch ArcGIS Notebooks in ArcGIS Pro.
I open the Windows Defender
To anyone still experiencing this issue despite adding environmental variables and reviewing conda config files, there is another area you should consider looking at, especially if using an authenticated proxy in your infrastructure.
Pro Notebooks leverage a webserver run as localhost on port 8778. If you've not set an exclusion on your proxy settings to prevent localhost:8778 (or 127.0.0.1:8778) from going through the proxy, it will fail authentication and will be given a http 407 error in response (which it cannot handle) and fail.
You'll need to work with your IT group to add this exclusion, depending on the proxy you use and how it is implemented.
Here is an example on how to do this in windows via Search > Proxy Settings:
The shortcut to Jupyter Notebook is messed up. If you go to the properties of the shortcut and go to the field Target you will see this:"C:\Program Files\ArcGIS\Pro\bin\Python\cwp.exe" "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3" "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Scripts\jupyter-noteThey want to put in there more than is possible, hence the cut-off notebook.If you would copy this manually in a command prompt or batch file with the completed paths it wont start.But, if you put this in the Target field: "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Scripts\jupyter-notebook.exe" it works it loads the config file for jupyter
I would try creating the environment from your normal user account rather than doing it as an administrator, if you do that you should see the environment in %LOCALAPPDATA%\ESRI\conda\envs by default. One thing you can try is just running the Pro notebook before installing anything into the initial clone to verify it works before making changes. There was an issue with clones that was fixed in 2.9 and 3.0 (see the Notebook FAQ) but that shouldn't apply for 3.1.
I am having the same issue. I am using 3.1.4 after doing a clean uninstall a few days ago to try to fix the issue. It worked until I cloned the python environment so I could install more packages. When I switch back to default Jupyter Notebooks works as it should. However, default doesn't have the packages I need.
The cloned environment is saved in the same folder as the default python: "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3-clone" - is that best practice or is there a better place?
Please note my script works perfectly in the python window using the cloned environment.
Any advice? We can't upgrade to 3.2 as we have incompatibility issues with our geodatabase 😞
Just replying to my own comment. I recently updated my ArcGIS Pro to 3.2.0 and the previous problem got resolved. Now, I can open notebook and script inside ArcGIS pro.
Are you working with the default arcgispro-py3 environment or a custom environment? Can you open notebooks from a Python Command Prompt session by running `jupyter notebook .` successfully? Unfortunately, there is a variety of possible causes, and these steps will help eliminate some possibilities.
I am encountering the same problem as well. Followed every step in previous discussions but it's still Failed to load notebook. The jupyter notebook works just fine outside ArcGIS Pro. Please help, thanks.
Are you working with the default arcgispro-py3 environment or a custom environment? Can you open notebooks from a Python Command Prompt session by running `jupyter notebook .` successfully?
Good day.
I am also getting failed to load notebook using Arcgis Pro 3.1.0. I tried to install the Package Manager but it does not update. Kindly assist
Yes that would be best, please follow the instructions at provided at Performing a clean uninstall of ArcGIS Pro | Esri Australia Technical Blog (wordpress.com)
@HannesZiegler,
Yes, I used UI for updates.My Python Command Prompt is Python 3.9.16. I'm leaning towards a complete uninstall/reinstall again. IT has to do this for me so it's a bit more difficult. What I would like more information on is how to uninstall all the bundled Python software, so everything is fresh on reinstall. Any pointers on this would be great.
@TylerT When you upgraded ArcGIS Pro, were you upgrading from 2.9 to 3.0.2 using the UI?
When you run python from the Python Command Prompt, what version of Python are you running?
@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
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.
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.
I am using ArcGIS pro 3.0 and can't open the jupyter notebook.
Bug ID: BUG-000155019 was logged in January 2023. Workaround suggested does not work for me.
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
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.
It fails to load notebooks. It doesn't load on default and cloned environments. I think the problem with default environment and nothing changes when I cloned it.
The hotfix package isn't necessary at Pro 3.1, because the issue it would address is already installed into the software. Are you having issues loading notebooks in Pro 3.1? Do they work outside of the application?
Unfortunately, it fails. Is there any solution?
> "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\conda.exe" install pro-notebook-hotfix=3.0 -p "C:\Users\user_id\Anaconda3\envs\conda-arcgispro" --yes Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Solving environment: ...working... failed SpecsConfigurationConflictError: Requested specs conflict with configured specs. requested specs: - arcpy-base - pro-notebook-hotfix=3.0 pinned specs: - arcgis=2.1.0 - arcgispro=3.1 - arcpy=3.1 - h5py=3.7.0 - netcdf4=1.6.1 - notebook=6.4 - pro_notebook_integration=3.1 Use 'conda config --show-sources' to look for 'pinned_specs' and 'track_features' configuration parameters. Pinned specs may also be defined in the file C:\Users\user_id\Anaconda3\envs\conda-arcgispro\conda-meta\pinned.
Any solution?
In a more complex case where this is only happening in an environment like Citrix, it makes sense to try and work through this with support. I'm not aware of any reproducible cases we have when the machine is typically configured and the installation is fully clean other than the configuration being manually changed like Hannes mentioned.Cheers, Shaun
I have the same issue. I am not sure if it is caused by the citrix machine, it worked in bomgar.
@HannesZiegler, 1) I guess I'm failing to see how a Clean uninstall of ArcGIS Pro - Esri BeLux is applicable. I don't get past step one since uninstalling is not my issue. The software uninstalls just fine.
2) I'm still curious about this command:
conda create -n pro-custom arcpy=3.1 proswap pro-custom
Revisiting a previous question, is this creating a fresh environment or close of default? I ask b/c wouldn't a clone of a corrupted env result in another corrupted env? i.e. Where are the libraries/modules coming from?Thank you,
> ... It wasn't clear to me that the python packages were un-installed / re-installed. Are python packages and default environment re-built with a clean install?
Yea, the package set in the default environment changes with each release. Normally the Python packages will uninstall and reinstall and you'll have no problems. But under some circumstances (like when packages are installed directly into arcgispro-py3) there will be files left behind. This may cause issues with the next version of Pro installed as well. That's why I was stressing in my previous reply to never install any packages directly into arcgispro-py3, it can cause you trouble. Always clone if you want to install packages.
In your case running through the steps in Clean uninstall of ArcGIS Pro - Esri BeLux would help rule out corruption of the arcgispro-py3 environment that may be persisting through your Pro installations.
@HannesZiegler ,Prior to the 3.1.0 update we did perform a re-install. It wasn't clear to me that the python packages were un-installed / re-installed. Are python packages and default environment re-built with a clean install?The Clean uninstall of ArcGIS Pro - Esri BeLux article is for non-fully uninstalled software. Is this applicable, or can we just un-install re-install?
Side note: My colleague is having the same notebook fail issue, but hasn't updated to 3.1.0 yet. We're going to try updating their machine next. If the update fixes theirs, then you're probably right...my environment might be corrupted, although I recognize the peculiar coincidence that will take.
Thank you.
@HannesZiegler , @ShaunWalbridge , thanks for the support. I'll give this all a go and let you know, and/or engage support specialist.
Hi, joining in on your conversation with Shaun.
> ... I've been upgraded to 3.1.0 and unfortunately the issue remains. ...
> ... No, I'm working in the default environment, ...
I'm wondering if you may have at some point installed packages into the default environment? If so, there could be problematic files left behind even after an uninstall, and these would cause problems in future installations/upgrades of Pro too.
If Shaun's suggestion to create a custom environment from scratch works, then you may want to try Clean uninstall of ArcGIS Pro - Esri BeLux to fix the corrupted installation.
> That looks like it's going to touch inaccessible directories. I'll need to engage admin.
You should normally not need to run as admin for this command, it will create the new environment in %userprofile%\esri\conda\envs. You could either ask them for write permission to that folder or for them to run the Python Command Prompt as an administrator. Otherwise, you can direct the clone to a folder where you do have write permission with the -p flag. The command would be something like this:
conda create -p C:\<your_path_to_folder_with_write_access>\pro-custom arcpy=3.1 proswap pro-custom
> What is the best management practice for admin to clone or create a new/fresh environment with all the correct packages?
Running the command from the Python Command Prompt should do the trick (arcpy=3.1 is the only package you need to specify, it will install all the required dependencies, see here).
> There were so many permission issues.
Yikes, it sounds like your machine is quite locked down. If the above fails, it'd be my main suspect and it might be helpful if your IT department calls tech support to work with a support specialist to narrow down the cause.
Shaun might have some additional thoughts, but here's the next steps I'd take:
1. Try creating the clone as per Shaun's suggestion.
2. If notebooks work in Pro with that clone active, you can either continue working with it from now on or (recommended) try Clean uninstall of ArcGIS Pro - Esri BeLux to fix the default. NOTE: Never install any packages directly into the default environment arcgispro-py3. Always clone first, then install your packages. That way, if the environment becomes corrupted, you'll always have a fallback in the default.
3. Check back with us here. Maybe there'll be new info after you try this that narrows down the problem.
4. Consider asking your IT department to work with a support specialist in tech support. You can also continue asking questions here, but a support specialist will be able to walk through the problem on your machine with the IT department and hopefully that will help resolve it.
That looks like it's going to touch inaccessible directories. I'll need to engage admin.
A couple of questions:Is your command above create a fresh environment or a clone of default. I'm guessing fresh, but can't figure out how the arguments pass what packages to install. Can you walk me through your command?I've sat with admin before to clone the default env through arcgis pro gui, and failed, and failed. There were so many permission issues. What is the best management practice for admin to clone or create a new/fresh environment with all the correct packages? i.e. How does admin run python prompt 'as admin' and write to my profile? Thank you,
OK, could you try creating a custom environment, set that as the active environment for Pro and see if it reproduces there? To isolate whether something is wrong with the default environment, try creating a fresh one from the command line with:
After that, try to reopen Pro and a notebook.
@ShaunWalbridge ; No, I'm working in the default environment, and yes Jupyter works stand-alone with your command and my typical command (navigate to some dir, fire Jupyter Lab...works fine). I am a daily user of Jupyter Lab within the arcgispro-py3 environment, never an issue. Only the embedded Jupyter. Thank you. Tyler
Are you working in a custom environment, or the default arcgispro-py3 one? If a custom environment, could you share the output of `conda list` on the environment from the command line? If the default environment, can you see if notebooks work as expected outside of Pro, e.g. by starting a Python Command Prompt and running `jupyter notebook %userprofile%`?
@HannesZiegleret al,
I've been upgraded to 3.1.0 and unfortunately the issue remains. Additionally, It has followed ESRIs recommended antivirus settings. We have the same issue on 2 of 2 of our ArcGIS Pro machines.Seems I'm running out of leads. Would the hotfix do anything at this point?Thank you,
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/1196582Cheers,
Shaun
Awesome. I'll give this a try at my next opportunity and let you know.Kind regards,
@TylerT, we may have a fix for your notebook issues. It turns out we may have caused this with a recent upgrade of the Notebook stack in preparation for the Pro 3.1 release. I just updated the FAQ, please try the following hotfix:
Q: When opening a notebook in ArcGIS Pro, why did I receive a "Failed to load notebook" error?
A: This is a known issue caused by a recently upgraded Notebook stack on the Esri channel. We have made a hotfix available, to install it simply search for and install the pro-notebook-hotfix package from the Package Manager in ArcGIS Pro. This can be accomplished with the following steps:
Notebooks should now open.
If there are still issues, the problem may be something else. Please check if you have made any changes to the Jupyter configuration file jupyter_notebook_config.py, make sure you haven't modified the c.NotebookApp.ip or c.NotebookApp.port configuration options, as modifying these will prevent ArcGIS Pro from launching the notebook.
+ dustinnelson_env
@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.
I am fairly new to GIS Pro 3.03 from ArcGIS 10.6.x desktop (agency lack of interest in migrating) and new to python and Jupyter notebooks. So forgive my nonprogrammer type answer.
I did have the same error after I had duplicated my environment and downloaded other conda Packages(r-ArcGIS bridge among others). Jupyter Notebooks would open from the Python Command Prompt in a browser, but I would get the same error you did if I tried to open them in GIS Pro.
Along with trying some of the suggestions in this post and others, I updated Jupyter from the Python Command Prompt. That got rid of the error for me, but notebooks opened blank (no command line or menu items) in GIS Pro. I could not see the content or edit them.
To trouble shoot this, first, I uninstalled GIS Pro, reinstalled it, updated it to 3.03, then duplicated my environment and tried to add some packages. Same error. So then I reactivated the default GIS environment. When I did this, the notebook worked. I suspect there were conflicts with some of the packages I had installed.
Update: To trouble shoot this further, I wanted to try to figure out what packages were causing this. I did yet another a fresh single user install of ArcGIS Pro 3.0, left the default environment alone, updated to ArcGIS Pro 3.03. The notebooks worked with no error. I then duplicated my environment, without adding any conda packages and the notebooks worked. Then I installed r-arcgis-essentials. Upon restart I got the same error again.
So I suspect that in my case at least, the installation of r-arcgis-essentials along with its dependents is what is killing the notebooks inside ArcGIS Pro 3.03. Now to try to figure out what in this metapackage is causing the issue.
A collection of the essential packages to work with R, ArcGIS and R NotebooksInstalled: 1.0License: Apache 2.0Homepage: https://r-arcgis.github.io/Developer Url: https://github.com/R-ArcGISSize: 3.86 KBDescription: A metapackage providing a Microsoft R Open (MRO) environment containing the R-ArcGIS bridge package (arcgisbinding), IRKernel for Jupyter Notebook support for R, and the R spatial packages sf, sp and raster.Dependency: arcgisprojupytermro-base 3.5.1r-arcgisbindingr-irkernelr-rasterr-sfr-sp
*Update the notebook functionality breaks with the install of the most recent and a couple previous versions of Geopandas.
@HannesZiegler et al,
It was mentioned above that ArcGIS Pro embedded Notebook uses localhost:8778 as a default. How can I check exactly which localhost my ArcGIS Pro is using in case it's not using the default? Thank you.
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.
Can somebody share the entire contents of their config file? Thank you.
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.
@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?
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
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.
No dice running from C: drive. Upgrading is easier said than done. I'll give that a try when allowed. Thx.
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,
UNC path.
No, if you haven't had occasion to mess with the configs, then there won't be a config to mess with 😄 (it has to be intentionally created with the command jupyter notebook --generate-config).Are your notebooks located locally, or on a server or network location with a UNC path?
Hmmm, interesting. I have no jupyter_notebook_config.py in the location described, or anywhere I can find. Is this the problem, perhaps?Adding to the evidence, another user in my group is experiencing the exact same issue upon upgrading to 3.0.2.
Thanks for engaging...much appreciated.
It's typically in your user profile under the .jupyter folder.
Both keys should be commented out (prefix the # symbol).
@HannesZiegler ,I have not knowingly modified jupyter_notebook_config.py file. Where is it typically located, and what should the c.NotebookApp.ip or c.NotebookApp.port configuration options be set to? Thx.
Hi @TylerT, make sure that there haven't been any changes to the Jupyter configuration file jupyter_notebook_config.py, see the FAQ.
BTW: The stand-alone jupyter lab/notebook is working fine including Arcpy and ArcGIS for Python modules.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.