PROBLEM

Script to download items runs successfully but no items are downloaded in ArcGIS Notebook and ArcGIS Notebook Server

Last Published: March 17, 2025

Description

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.

Cause

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.

Solution or Workaround

Run the script in Jupyter Notebook or as a stand-alone 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.

Specify the web folder location and download the item from ArcGIS Notebook and ArcGIS Notebook Server

  1. On a notebook, click the Files tab and click the home folder.
The Files tab on a notebook
  1. Create a new folder using the New folder button. Note the folder location and specify it within the script to download the items. The following is a sample code snippet:
folder_path = r"/arcgis/home/Test"
The web folder location on a notebook
  1. Run the script.

The downloaded items can be accessed and downloaded from the folder.

The downloaded items in the notebook web folder

Article ID: 000035034

Software:
  • ArcGIS Online
  • Portal for ArcGIS
  • ArcGIS API for Python 1 x
  • ArcGIS Enterprise 11 1
  • ArcGIS Enterprise 11 3
  • ArcGIS Enterprise 11 2
  • ArcGIS Enterprise 11 4

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options