Questions tagged [indentationerror]

IndentationError is a built-in exception for Python, and is a base class for syntax errors related to incorrect indentation.

Filter by
Sorted by
Tagged with
0
votes
1answer
112 views

ArcMap Raster Calculator with Python code

I'm trying use raster calculator that can export a raster to do different average values for for multiple layers. For example, I want to do averages for only the values and layers that are greater ...
1
vote
0answers
73 views

Python IndentationError when trying to edit graphical modeler in QGis. Can it be fixed?

I am trying to edit a model I built in the QGis graphical modeler and I get the following error. IndentationError: unindent does not match any outer indentation level 2017-11-27T14:53:42 1 ...
0
votes
1answer
166 views

Several IF statements with Indentation error

I wrote a very long "if statement" script but something doesn't work. It returns several Indentation errors but I cannot understand where...could be something else? from PyQt4.QtCore import * from ...
-1
votes
1answer
47 views

Add constant raster into Equation in ArcPy Script

In last equation instead of multiplying 0.98 , i just want to replace it by constant raster and multiply by constant raster (ras_LUE) , below is my updated code for adding constant raster. but its not ...
3
votes
1answer
292 views

blue indentation error in python qgis console

I have small problem with python console in QGIS. Normally, I write some code in text editior and then copy whole code to python console. Unfortunately, the console underlines the indentations with ...
-4
votes
1answer
363 views

How to add rule and add feature class to topology using arcpy [closed]

import arcpy import os # Set the workspace arcpy.env.workspace = "D:\topology\Contours.gdb" # The name of the data_set containing the topology data_set = "Contours" # The name of the topology ...
1
vote
2answers
1k views

IndentationError: expected an indented block

I am getting the IndentationError in arcpy. I understand this is covered elsewhere but none of the tips appear to be working, I cannot figure out the error. Here is my code; def getCoords(self): ...
1
vote
0answers
143 views

How can I upload CSV file in QGIS Desktop App?

Please see link : http://www.qgistutorials.com/en/docs/building_a_python_plugin.html I am using the same process for uploading a CSV file in a folder but it gives me an error. I am using this code: ...
-2
votes
1answer
319 views

Python Graduated Symbols [closed]

I am currently struggling with creating graduated symbols via Python. Based on ArcGISHelp 10.1 - GraduatedSymbolsSymbology (arcpy.mapping) I am doing as follows: import arcpy mxd = arcpy.mapping....
1
vote
1answer
779 views

Looping if condition using ArcPy?

I'm working with Arcgis 10.1, i'm trying to loop if condition on Python code, but they give me as error : Parsing error IndentationError: unexpected indent (line 18) I don't know what is going ...
0
votes
1answer
328 views

Replace Domains of ArcGIS 10.1

I need to Replace the Domain on Field level on my Geodatabase. My Geodatabase having multiple features and tables where at each on field one Domain is assigned, I need to replace that Domain and ...
7
votes
4answers
11k views

List all Feature datasets & feature classes from a single geodatabase into CSV

I have prepared a python code and I got the following errors: "Parsing error IndentationError: expected an indented block (line 11)" and "Runtime error Traceback (most recent call last): File ...
0
votes
1answer
65 views

arcpy pantoselected error

I am trying to get an user input for getting a parcel name and pan the map to that selection. What am I doing wrong in the code below? import arcpy #Msg box to get parcel Name parcel_Name = str(...
-1
votes
1answer
600 views

Python - indentation error [closed]

I've started learning python for future use in QGIS and using Ubuntu, installed with Python 3. I'm doing the tutorials from the great book for newbies "A byte of python". I'm having troubles running ...