Python script execution fails with "IndexError: list index out of range"

Last Published: April 25, 2020

Error Message

Running a standalone geoprocessing script from a Python IDE returns the error "IndexError: list index out of range". An example of the message in the Interactive Window can be seen in the screenshot below.


The script may contain arguments that must be passed into the script by the user at runtime.

Solution or Workaround

Depending on the structure of the script, pass in the appropriate arguments. These can be identified by reviewing the code prior to executing the script.

  1. In the initial execution dialog, type the strings into the Arguments text box.
  2. Click OK to run the script with the arguments now being passed in. In the following screenshot, the successful geoprocessing results are returned in the Interactive Window.

Article ID:000011161

  • ArcMap

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