Skip to main content

Questions tagged [indexerror]

Use this tag when referring to an error resulting when indexing in ArcGIS

0 votes
0 answers
20 views

Fixing IndexError from QGIS Weights of Evidence (WofE) plugin

I am using the QGIS plugin Weights of Evidence (WofE) plugin (https://github.com/chudasama-bijal/QGIS-Plugin-Weights-of-Evidence-Model). When I perform the 'Calculate Weights' step using the Evidence ...
JSAV's user avatar
  • 1
-1 votes
1 answer
125 views

ArcPy "listElements" error reported

I'm writing a script to convert a CAD polygon feature in a shapefile, calculate area(ha) in a new field and zoom to it in a 25.000 scale. import os, arcpy, sys from arcpy import env #PAR�METROS DA ...
Alexandre Soares's user avatar
0 votes
0 answers
60 views

SearchCursor is outside tuple range despite having multiple fields in the parameter

In the below script, I get an error on line that starts with insertRow that says IndexError: tuple index out of range. outputLocation = arcpy.GetParameterAsText(0) nullPntFc = arcpy.GetParameterAsText(...
matthiastrek's user avatar
0 votes
0 answers
165 views

How to export shp and TIFF files from a list with Python

I'm a beginner in Python, and I am trying to write code that receives a list of TIFFs and shapefiles from an input folder. The objective is: Do a clip to a raster using the Extract By Mask and if the ...
brubis's user avatar
  • 139
3 votes
1 answer
568 views

IndexError: list index out of range - item report ArcGIS API for Python

I'm quite new to Python and ArcGIS API for Python. I'm trying to create a report of all the items owned by one of my ArcGIS online organization user. For each item owned by the user I want to record ...
Carl's user avatar
  • 135
1 vote
1 answer
570 views

Buffering point using PyQGIS?

I have made an attempt to create a buffer around some points useing PyQGIS. However, when running the following code (see below) I receive and IndexError saying that 'list is out of range'. What ...
A.N's user avatar
  • 181
2 votes
1 answer
2k views

Getting IndexError: list index out of range from arcpy.mapping.ListLayers() in Python Window of ArcMap?

i want to turn on label using arcpy, i use current mxd and my mxd path in my script and my layers also active in the current MXD, but it give me this eror, can somebody help me? here the script i ...
RPP's user avatar
  • 39
0 votes
1 answer
959 views

Using Update Cursor gives IndexError: list assignment index out of range?

I am trying to use an update cursor and receiving an error. I'm not very familiar with using cursors, so please bear with me. I am trying to write a 1 or 0 to a field, based on a condition. The error ...
phead's user avatar
  • 13
0 votes
1 answer
35 views

IndexError when adding multiple fields to shapefile

As part of a larger project i'm looking to add multiple fields to a shapefile using an index. This is the snippet in question: listFields = [['ITEM', 'TEXT'], ['SYSTEM', 'TEXT'], ['WATERCOURCE_BANK', ...
Matt Houston's user avatar
-1 votes
1 answer
181 views

Removing layer from specific data frame using ArcPy gives IndexError?

I work on several maps- each map has different number of data frames (several maps had only 1 or 2 data frames). with this code i try to remove layer "frame" from the third data frame only. I want ...
newGIS's user avatar
  • 4,072
0 votes
1 answer
39 views

IndexError Out of bounds for Graphic Element

I have this error that I'm confused on how to resolve getting this North arrow graphic element from the map document. Code: result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, ...
Demon's user avatar
  • 143
1 vote
2 answers
423 views

Converting .csv file to file.shp using Python gives IndexError?

I have a file.csv like the following: 37.0925854357,14.3860984446,0.0000079572,0.0000939491,0.0000028935 37.0978554286,14.5199850398,0.0000041594,0.0000821038,0.0000047924 37.1029267200,14.6538928343,...
Domenico Fuoco's user avatar
2 votes
1 answer
1k views

Apply a definition query to a Layer Group

I'm trying to apply a definition query to multiple layers within a Layer Group by using the following script where I would simply change the values for my 'SUBCODE' field: import arcpy #Variables to ...
pac_co's user avatar
  • 547
1 vote
1 answer
196 views

QGIS python error for XY tools plug in, even after installing xlrd and xlw modules!

As I am a complete beginner, I had troubles getting the XY tools plug in running. Now that the xlrd and xlw module error has disappeared after installment of said modules, I can finally choose the X ...
Metzi's user avatar
  • 11
2 votes
1 answer
14k views

How to fix a IndexError: string index out of range

I'm still working on my script for vineyards. I need to count row and vine in row. So I code this : #Nombre de rang nbr = QgsExpression( "ID LIKE '%-1'" ) itnbr = layer.getFeatures( QgsFeatureRequest(...
Tim C.'s user avatar
  • 1,516

15 30 50 per page