Skip to main content
4 votes

Getting readable message level of Qgis.MessageLevel

As far as I am aware PyQt does not support iteration over names/values of Qt's enum types as you could do with standard python enums. Instead, you can get information on the enumerator via the ...
CodeBard's user avatar
  • 3,699
3 votes
Accepted

ImportError when importing QgsRasterCalculator in QGIS

The QgsRasterCalculator class is part of the analysis module: https://qgis.org/pyqgis/3.28/analysis/QgsRasterCalculator.html
bugmenot123's user avatar
  • 11.3k
2 votes

import module qgis.core in standalone script with pyqgis without running bat before with environment?

You can set the environment variable in your python script before you import qgis.core. E.g. for the environment variable in your code above: rem Append QGIS Python Plugins directory to PYTHONPATH set ...
Pieter's user avatar
  • 4,119
2 votes

Getting readable message level of Qgis.MessageLevel

They are a few functions having displayString in their name to convert an enum item to a "display string". Like https://api.qgis.org/api/classQgsWkbTypes.html#...
etrimaille's user avatar
  • 7,447
2 votes

Use QGIS `processing.run(...., alg_params)` from OSGEO4W shell in QGIS Dev 3.26

To get this to work I had to do the following. 0 - Make sure there is nothing wrong with your install by first running C:\OSGeo4W\bin\python-qgis.bat and then try import qgis. If this gives errors the ...
GeorgeC's user avatar
  • 8,298
1 vote

Getting readable message level of Qgis.MessageLevel

With pure Python, you can do introspection and create your own useful translator : from qgis.core import Qgis message_levels = { getattr(Qgis, i): i for i in dir(Qgis) if isinstance(getattr(...
J. Monticolo's user avatar
  • 15.9k

Only top scored, non community-wiki answers of a minimum length are eligible