AVArray: Index [number] not in range...

Last Published: April 25, 2020

Error Message

Running the script "gps2shp.ave" returns:

"AVArray: Index [number] not in range..."

[number] can be any number.


Extra spaces in the points file can cause this error. These spaces may be found after the last record. The error occurs if the points file was created manually.

The script "gps2shp.ave" can be found in the ArcView Help > Contents > Sample scripts and extensions > Sample scripts > Views > Data conversion/alteration > Converts ASCII GPS output to shapefile.

Solution or Workaround

  1. Open the points file in a text editor.
  2. Remove extra spaces from the file.

    The file should be ASCII text in the form:

    station id,x1,y1
    station id,x2,y2

  3. Press Enter after the last line.

    Avoid adding any extra spaces

Article ID:000005059

  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic