PROBLEM
Running a script to download items using the download() function in ArcGIS API for Python through ArcGIS Notebook or ArcGIS Notebook Server completes successfully, but no items are downloaded to the specified folder location within the script. However, the same script successfully downloads the items when run in Jupyter Notebook or a stand-alone script. For a sample script to download items, refer to How To: Back up hosted content by looping through and downloading hosted feature services in FGDB format.
A local folder location on the machine is specified in the script. ArcGIS Notebook and ArcGIS Notebook Server do not run locally and are not directly connected to the machine's local folder. In contrast, Jupyter Notebook and a stand-alone script run locally and are directly connected to the machine's local folder. As a result, the script runs successfully when a local folder is specified within the script.
Jupyter Notebook is installed with ArcGIS Pro, along with the IDLE Python editor. When using a local folder to download the items from ArcGIS Online or the ArcGIS Enterprise portal, Esri recommends using the Python editor for a direct connection to the machine.
folder_path = r"/arcgis/home/Test"
The downloaded items can be accessed and downloaded from the folder.
Article ID: 000035034
Get help from ArcGIS experts
Download the Esri Support App