Questions tagged [attributeerror]

an AttributeError is one of the built-in exceptions for Python. It is raised when an attribute reference or assignment fails.

Filter by
Sorted by
Tagged with
1
vote
1answer
23 views

Shapefile type description showing attribute error

import arcpy esc = arcpy.Describe("C:\Users\Drona_Maps\Desktop\lecture16\shapefiles\world_continents.shp") print esc.ShapeType Shape file type description showing attribute error like this: ...
0
votes
0answers
35 views

AttributeError: 'NoneType' object has no attribute 'GetLayer'

Using: QGIS 2.18 with a plugin: ECOPLAN Scenario evaluator, inserting self-made shapefiles made in Arcmap. Received this error: Traceback (most recent call last): File "C:/Users/PAU-...
0
votes
0answers
172 views

RQGIS3 : AttributeError: module '__main__' has no attribute 'RQGIS3'

I am trying to use the RQGIS3 package to access QGIS3 functions from R, and although briefly I had things working (mostly), running the following code: library(RQGIS3) qgis_env <- set_env("C:/...
2
votes
0answers
48 views

Using QGIS plugin default code produces attribute error

Using Windows 10/QGIS 2.18 and QT Designer, I am creating a plugin that will create several random point selections and to place the results by appending several point layers. So I created a "...
0
votes
0answers
295 views

AttributeError: 'module' object has no attribute 'xxx'

I'm trying to reduce a workflow; wherein I take a polyline file, add points every 1700m and split the polyline at those points. I then use this new split polyline file as an index for data driven ...
1
vote
1answer
51 views

AttributeError from PDF Export from ArcMap Bookmark Loop

import arcpy, os, datetime folderPath = r"C:\path" dateTimeStamp = time.strftime('%Y%m%d') basename = "Flows" mxd = arcpy.mapping.MapDocument(r"C:\path\file.mxd") df = arcpy.mapping.ListDataFrames(...
2
votes
0answers
209 views

QGIS Python AttributeError: 'NoneType' object has no attribute 'processingRegistry' [closed]

I am executing a QGIS Desktop 3.8.3 Python 3 script. from osgeo import ogr, gdal from gdalconst import * from qgis.core import * import qgis.utils, sys from qgis.gui import * from PyQt5.QtGui ...
1
vote
1answer
58 views

GDAL module in python error

I have some troubles with GDAL module on Python. When I try to import gdal, console displays this: Файл "c:/rstp/Lib/site-packages/osgeo/__init__.py", строка 48, из <module> __version__ = ...
0
votes
0answers
148 views

Listing all domains and their coded values into table via ArcPy?

I am new to Python. I'm trying to gather a list of all of our Domains (we have a lot) and their coded values and export them into a table or a format that can easily be put into a table. I've had luck ...
0
votes
0answers
56 views

MMQGIS Export error

I have set up some 1 KM grids via a country Shapefile and I want to get the coordinates of the four corners into a CSV file. I am using MMQGIS (QGIS plugin) and I'm trying to run a geometry export to ...
0
votes
1answer
101 views

GetRasterBand()Method for GDAL in Python

I'm working on getting the NDVI value of Landsat imagery 2018 using band 4 and 5 but I have encountered a slight problem. import osgeo from osgeo import gdal#gdal, data conversion tool from ...
0
votes
1answer
639 views

AttributeError: 'Series' object has no attribute 'has_z'

I got the following GeoDataFrame taken from a CSV file and after some slincing and CRS and geometry asignment ctf_nom geometry id 0 Prunus ...
1
vote
0answers
687 views

Python - Issue to create choropleth map based on GeoJSON file: AttributeError

I'm trying to build a choropleth map, I cannot figure out why I get this error: AttributeError: 'NoneType' object has no attribute 'get' Here is my code: station_nb is a dataframe with values ...
1
vote
1answer
113 views

Getting AttributeError when exporting Heatmap using qgis2web? [closed]

I want to make a heatmap layer on my webgis. using these options but when i'm trying to export it using qgis2web i always get this error. 2019-06-21T10:15:53 WARNING Traceback (most recent ...
3
votes
0answers
58 views

Lines length plugin - QgsVectorLayer error

Several similar questions have already been made, but none of the is helping me. I have a layer of polygons and I want to known the length of each line of each polygon. And based on the length I ...
1
vote
0answers
156 views

Getting AttributeError: 'NoneType' object has no attribute 'sourceCrs' from TIN Interpolation in QGIS?

I am trying to use the TIN interpolation to interpolate conductivities between a vector layer in QGIS 3.4. and I always get this error: Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~...
1
vote
1answer
148 views

'NoneType' object has no attribute 'identify'

I'm trying to run a console script, but it gives an error: : AttributeError:'NoneType' object has no attribute 'identify' Yet it works well in QGIS 3.7 Here is the script: import sys import time ...
1
vote
0answers
167 views

QGIS Python AttributeError object has no attribute 'pushVersionInfo'

I am unable to use almost all of the processing toolbox features in QGIS. I keep getting the following Python error across multiple algorithms: AlgorithmDialog.py", line 208, in runAlgorithm self....
0
votes
2answers
77 views

Geoviews Attribute error

I just installed GeoViews with success and I tried to follow one example at the first page of their site and this already gave me an error. In fact, there are two errors of the same type that occurred ...
0
votes
1answer
2k views

Getting AttributeError: 'module' object has no attribute 'CalculateGeometryAttributes_management'?

I am trying to calculate the area for my grid cells. For that, I give the following command arcpy.CalculateGeometryAttributes_management(union, "AREA") Here, union is my grid and I need to make a ...
1
vote
1answer
2k views

Displaying attribute field value in TextElement gives AttributeError: 'list' object has no attribute 'text'?

I am new in Python scripting. I have a geodatabase with layer Test and this layer has field Name and Text element on layout named TEname. I am trying to show selected feature attribute Name value in ...
1
vote
0answers
362 views

GeoPandas geocode error when using Nominatim

I am following this lesson about Geocoding. I have entered: # Import necessary modules import pandas as pd # Filepath fp = r"addresses.txt" # Read the data data = pd.read_csv(fp, sep=';') data....
2
votes
0answers
102 views

Clipping outside QGIS with PyQGIS?

This is my first script and I having a problem trying to clip a shp file. I'm running on a linux server and this is my code: #! python from datetime import date from qgis.core import * from PyQt4....
1
vote
1answer
542 views

Getting AttributeError from ArcPy?

I'm working on a simple Python code to make a raster from a shapefile using the Natural Neighbors tool, and then use the resulting raster to generate a contour using the Contour tool. I keep getting ...
0
votes
1answer
241 views

Tried running a script, kept getting “AttributeError: DescribeData: Method spatialReference does not exist”

Anyone know how i can fix this problem below? I am trying to merge all the layers under the same name in different subfolders. import arcpy import os # parameters input_folder = arcpy....
0
votes
0answers
730 views

AttributeError: Myclass instance has no attribute 'x'

I am trying to select a feature from the layer using my plugin. When working with my plugin in main Python function using QGIS, I receive an AttributeError when I call a class method from within the ...
0
votes
1answer
657 views

AttributeError: DescribeData: Method fieldInfo does not exist

I have a script that looks at feature class inside a .gdb and prints some simple information about the attributes field. Note- these is actually only one feature class in the .gdb. I want use the ...
0
votes
1answer
637 views

Features show on data view, but not in Attribute table?

There are 966 points for tree data that was collected in the field. When I try to open the attribute table only 2 points' data show up. I've tried to create layer from selected, because when I choose ...
1
vote
1answer
3k views

AttributeError: 'NoneType' object has no attribute 'pushButton'

I am using PyQt5 working in QGIS to create a simple plugin. I started by creating a pushButton with QtCreator and create an event using this code: from PyQt5.QtCore import QSettings, QTranslator, ...
0
votes
2answers
756 views

arcpy.Delete_management not working?

I've updated the code with the suggestions in the code but still not working. arcpy.env.workspace = r'F:\EGM722 - Customising GIS apps\Assignment\folklore.gdb' arcpy.env.overwriteOutput = True arcpy....
2
votes
0answers
1k views

QGIS Error: Join attribute by location

I'm getting this error code with QGIS when I am using the tool Join attribute by location: I'm trying to join the attribute table of polygons into my vector points attribute table. Processing ...
3
votes
2answers
85 views

Duplicating existing polygons based upon number in attribute field using ArcPy gives AttributeError?

We are working with parcel data that includes a single polygon for each individual tax parcel. We need to develop a list that includes an attribute for each residential address. Some tax parcels could ...
1
vote
0answers
159 views

Debugging AttributeError Invalid destination path from ArcPy? [duplicate]

I am struggling with using Python to export an mxd to PDF. The final PDF would have 4 pages, each with the same extent but with a different layer displayed. Below is the code I entered into the ArcMap ...
0
votes
0answers
647 views

AttributeError: 'unicode' object has no attribute 'replaceWorkspacePath' [duplicate]

I must of written this code using 15 different structures with no luck. I am simply trying to take an old layer 'Windfarms' stored in 'C:\Users\darle\Desktop\MXD_Test\Test.gdb' and replace it with '...
1
vote
3answers
15k views

AttributeError: class instance has no attribute 'class_function'

When working in my plugin's main python function, I receive an AttributeError anytime I call a class method from within the class itself. For example the sample code below: class PluginName: def ...
1
vote
1answer
3k views

AttributeError: 'NoneType' object has no attribute 'asPoint'

I'm new to QGIS, and have never used the Python console. I have created a complex layer in QGis using an experimental, plugin which I had to manually install. It contains 91506 features; lines going ...
1
vote
0answers
356 views

AttributeError: 'NoneType' object has no attribute 'RasterCount'

Any idea what this error means? AttributeError: 'NoneType' object has no attribute 'RasterCount' I get this error when I am trying to save a ROI in QGIS (within the SPC plugin). I have uploaded a ...
-5
votes
1answer
164 views

ArcPy Describe function gives AttributeError? [closed]

import arcpy infc = r"C:\Users\123\Desktop\文件\test.shp" print infc desc = arcpy.Describe(infc) print desc shapefieldname = desc.ShapeFieldName print shapefieldname rows = arcpy.SearchCursor(infc) ...
3
votes
3answers
1k views

Python AttributeError working with QGIS Plugin-Builder

I started to develop my own QGIS plugin today and I was pretty confident when browsing through all the different literature and tutorials available on the web. I started this beginners tutorial and ...
1
vote
2answers
669 views

Using ArcPy cursor to concatenate row values?

I am ArcGIS 10 user and I want to create ArcPy script for simple concatenate row values like this tool Concatenate Row Value that works with ArcGIS 10. I have three fields in my shapefile id,field1,...
1
vote
0answers
633 views

Debugging AttributeError: 'module' object has no attribute 'runalg'? [duplicate]

I want to use QGIS and processing to run some tasks that would be redundant to do by hand. When I try to run a script as a stand alone I get the error AttributeError: 'module' object has no ...
0
votes
1answer
66 views

Arcpy debug question

I'm running this script to iterate through layers, zoom to them, then export each as a pdf but I keep getting this error: AttributeError: 'str' object has no attribute '_arc_object' I'm not skilled ...
2
votes
2answers
458 views

AttributeError when using arcpy.GetParameterAsText()?

I found a script to batch export geotiffs from data view and when hard coded it work well mxd = arcpy.mapping.MapDocument("CURRENT") res = 200 #resolution of tif export = "S:\\6 - GIS\\For Randoms\\...
3
votes
2answers
2k views

Using fieldinfo.setVisible in ArcPy?

I went through the documentation, and searched around but wasn't able to figure this out. What I want to do is export shapefiles, but have certain fields turn off. I was successful in turning off ...
1
vote
0answers
129 views

Batch converting 10.4 mxd files to 10.1 with ArcPy gives AttributeError: MapDocObject: Unable to save?

Closely related to Converting .mxd files that were created with 10.3 to .mxd files that are compatible with 10.1, except I am running ArcGIS 10.4. It should be possible for me to make 10.1 copies of ...
1
vote
1answer
224 views

Incrementing ID with DA Update Cursor

I'm currently applying a select by attribute query to select null values before applying an increment cursor, but I'm interested in reducing the code by using a where clause and employing the updated ...
1
vote
1answer
1k views

Zoom to extent using ArcPy?

Working on being able to zoom to the extent of features in a search row to produce individual maps for row (like data driven pages but for individual rows on the dataset). I just can't seem to get it ...
-2
votes
2answers
92 views

Converting all layers to Excel using ArcPy?

I'm trying to convert all layers in a folder to excel tables and keep the same file names. Here's what I have so far and the error I got. arcpy.env.workspace = "C:/layersFolder/" layers = arcpy....
3
votes
1answer
1k views

AttributeError: 'int' object has no attribute 'setName' (or insertChildNode)

I am trying to make group and fill it with layers in pyQGIS. Piece of my code: from PyQt4 import QtCore, QtGui from PyQt4.QtCore import QFileInfo from qgis.core import * from qgis.utils import ...
-1
votes
2answers
739 views

Counting number of instances of certain field value using ArcPy?

I am creating code that accesses a shapefile named Schools.shp. I data I am trying to locate is the attribute field named FACILITIES. Within the FACILITIES field I am trying to get values that the ...