Questions tagged [nameerror]
Use when NameError from Python is thrown by your code
9
questions
6
votes
1
answer
5k
views
Performing Ordinary Kriging in SAGA via QGIS SEXTANTE Plug-in?
I'm trying to learn how to apply the kriging analysis in QGIS using the SEXTANTE plug-in and SAGA tools. It appears that I have my SEXTANTE and SAGA folders configured properly according to the user ...
0
votes
1
answer
3k
views
NameError: name 'QImage' is not defined [closed]
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "F:/QGIS/bin/test.py", line 6, in <module>
img = QImage(QSize(800,600), QImage....
10
votes
1
answer
3k
views
Adding PostGIS layer from QGIS Python plugin
I try to develop a plugin to add postgis layers to qgis from a plugin as part of learning python.
The code for adding a postgis layer is taken from the cookbook and work fine if I run it from the ...
9
votes
1
answer
4k
views
Calling GRASS modules in pyQGIS?
I wish to use a Grass module (v.to.db) in QGis, without the grass toolbox.
I tried with the Python console, but to no avail :
Using Sextante plugin but obviously it didn't know all the grass modules.
...
3
votes
2
answers
5k
views
Error msg "Name is not defined" when trying to populate a field with the shape file name
I am trying to populate a field with corresponding file name. For example, if the file name is Route1.shp then the field value will be Route1 as well. However my code is not working. Can you please ...
3
votes
2
answers
1k
views
How to control state of buttons in Python Add-In?
I have bunch of buttons to perform separate tasks within a Python Add-In. Buttons are greyed out and required to be enabled after initial tools run. In the following example, tool1 is turned off after ...
2
votes
1
answer
323
views
Using ArcObjects ITextSymbol.GetTextSize in Python to define two input variables that get populated by method
I am using Python 2.6 and ArcObjects in ArcGIS 10.0 to build and draw, among other things, graphic text on the current display. At one point I need to use the ITextSymbol.GetTextSize method. In a ...
1
vote
4
answers
10k
views
NameError: variable not defined even though set multiple times
This code original worked when run through the python command window in ArcCatalog. After I added the script to a toolbox I have had all sorts of troubles.
The most frustrating error has been:
...
1
vote
1
answer
61
views
Correct SQL expression for SelectbyAttribute Tool [duplicate]
I'm trying to apply the sql expression described here https://geonet.esri.com/thread/76028, that involves querying out odd values in a field. The specific sql expression is Round(NumberField / 2, 0) &...