Linked Questions

0
votes
0answers
264 views

module 'qgis.processing' has no attribute 'run' [duplicate]

I am using Python for my postgraduate studies and I am having trouble running my code when I try to use processing in Qgis using the command-line interface. I think the error is really easy to fix it ...
0
votes
2answers
82 views

Executing QGIS tools in Python from Linux Shell [duplicate]

I would like to execute a Python script which uses QGIS Processing tools. On Ubuntu 20.x I installed qgis, qgis-common, python3-qgis and python3-qgis-common. My objective is to execute the tool Exploe ...
1
vote
1answer
135 views

QGIS - Eliminate sliver polygons in standalone Python code [duplicate]

I am trying to remove sliver polygons under a certain area. I need to do this in a stand alone Python script, and not from within the GUI. Is this possible? In standalone python I was trying a ...
0
votes
0answers
23 views

Why does QGIS throw me an error on startup with processing.run? [duplicate]

I am trying to run python startup script for QGIS with the following code: from qgis.core import * from qgis.utils import iface import os from qgis import processing project = QgsProject.instance() ...
0
votes
0answers
23 views

Native algorithms not available in standalone QGIS when 3rd party algorithms are working [duplicate]

I'm writing some standalone python code (in Spyder) to automate QGIS work. I am successfully using 3rd party algorithms, having performed the following setup: #initialise qgis qgishome = 'C:/Program ...
19
votes
2answers
14k views

Accessing `processing` with Python?

I want to access the explode lines function in Python outside of QGIS from a standalone script. What module do I have to load in order to use it? How can I access processing? from qgis.core import ...
6
votes
2answers
2k views

Why does QGIS 3.2 “native:extractvertices” algorithm not work properly in standalone script?

I execute standalone python code (almost identical to the code in the accepted answer): The output file does not contain data, and I get this error message: Warning 6: Normalized/laundered field ...
4
votes
3answers
2k views

Call QGIS geoprocessing tools from command line (terminal, bash-script)

Is there any possibility to call tools found in the QGIS processing toolbox from the command line, other than using python? It is my understanding that if you use any GDAL tools, the QGIS gui is just ...
4
votes
1answer
2k views

Failed to create memory layers in QGIS application on Linux

I have written a python class which reads properties of map layers from an XML file and creates appropriate memory layers. I have developed and tested this code with QGIS 2.8.2 on a Windows 7 machine (...
4
votes
1answer
1k views

PyQGIS scripts outside of QGIS GUI running processing algorithms from GRASS provider

I'm writing a script that I would like to work outside of QGIS GUI. The script uses the processing algorithm standalone just fine for the native algorithms, however I am experiencing errors when ...
3
votes
0answers
10k views

Calling processing algorithm in different file than main file for standalone application [closed]

I need to run a processing algorithm that is coded/called in different file than main file. I've read some posts (1, 2, 3, 4, 5) but they give a solution that runs algorithm in main file. When I use ...
4
votes
2answers
1k views

pyQGIS 3.0 script not running with processing import

I have problems using version 3 of QGIS with Python 3. I followed different tutorials like this one : how to use pyqgis processing runalg clipvectorsbypolygon But it seems to be working only with ...
3
votes
1answer
929 views

How to adjust Python code from PyQGIS 2 to 3 to create a buffer on a shapefile

I am starting to learn PyQGIS and following tutorials online. However, I have QGIS 3.0 and most of the tutorials use QGIS version 2. I am trying to do a buffer on a point shapefile, but only have the ...
4
votes
1answer
1k views

QGIS 3.4/3.6 standalone script

So, I have this little script (which I would like to build more upon). I was able to make it work in QGIS3.2 (just change all paths and environments to 3.2) but now, after deleting QGIS 3.2 and ...
4
votes
1answer
938 views

Updating Algorithm list in pyqgis3?

I am attempting to run a union operation in a standalone pyqgis script and I'm receiving this error: Algorithm qgis:union not found The union operation fails with this code: params = { 'INPUT' ...

15 30 50 per page