Linked Questions

28
votes
2answers
8k views

Using QGIS3 Processing algorithms from standalone PyQGIS scripts (outside of GUI)

I'm writing a script which must work outside of QGIS GUI. I call some API functions from qgis.core but I'd like to use the processing plugin. I'm able to import processing with sys.path.append() but ...
8
votes
1answer
14k views

How to fix 'Could not find the Qt platform plugin “Windows” in “”' when implementing qgis in custom Python3 application?

I am implementing qgis 3.4.3 in a custom application, but when I instantiate the QgsApplication() class, I receive the error "Could not find the Qt platform plugin "Windows" in "". I've attempted ...
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
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 ...
1
vote
0answers
1k views

Using qgis.core in Pycharm

I set up a batch file to launch pycharm on Windows in accordance with https://qtibia.ro/2016/06/09/how-to-setup-pycharm-for-qgis-development-under-linux-and-windows/ @echo off SET OSGEO4W_ROOT=C:\...
3
votes
1answer
267 views

PyQGIS in PyCharm 2020

I know this problem appears over and over again, but maybe someone can help me. I've read many articles on GIS StackExchange on the topic and I'm referring to this post: Why does QGIS 3.2 "...
3
votes
2answers
484 views

PyQGIS standalone script using QGIS 3.2

I want to work with PyQGIS Python 3 using QGIS 3.2 standalone install. I created a simple batch file to work with PyQGIS but I have some errors. Here's the batch file: @echo off SET OSGEO4W_ROOT=C:\...
3
votes
0answers
506 views

Using both QGIS and native processing algorithms in standalone Python script?

I am developing a Python standalone script to process DEM in order to produce slope in vector format. I used PyQt5 to make a GUI to accept input data and parameters from user. My script is like this: ...
2
votes
1answer
300 views

QGIS dll load fail with from qgis._core import *

I have a error in console python, I tried using pyqgis without qgis interface. My problem is when I use: from qgis.core import * Console's the message is: from qgis.core import * Traceback (most ...
3
votes
0answers
225 views

PyQGIS 3.0: cannot make it work under Windows

I've just tried to install QGIS 3.0 package in my Anaconda (Win7x64, Python 3.6 x64). I wanted to use QGIS widgets in my PyQt application. Alas, QGIS works incorrectly: at first, when I just tried to ...
0
votes
0answers
167 views

Python 3.6 crashes after running QGIS 3.4 qgs.initQgis()

My Python window crashes after running this script. I have tested and it stops specifically at the qgs.initQgis() line. I think that something changed in qgis from QGIS 2.18 to QGIS 3.4 where I need ...
3
votes
1answer
108 views

QGIS processing.run() standalone script does not write .prj and .cpg output files of shapefile?

I've created a python standalone script to clip two shapefiles with qgis. I've installed qgis3 with OSgeo4W. The logic is as follows: import qgis from qgis.core import * from qgis.core import ...
1
vote
0answers
108 views

PyQGIS (3.4) and PyQt5 DLL error

I have installed the new version os QGIS(3.4) on my computer. I am working in a standalone application of PyQGIS so I need to load PyQt5 components. As a difference with previous versions when I try ...
1
vote
0answers
104 views

Processing error when using PyQGIS in PyCharm

Running processing alghorithms works fine from the Python console in QGIS. I am using OSGEO4W (Python 3.7). However when trying to run the same processing algorithm in PyCharm, I get the following ...