[Qgis-user] PyQGIS script segfaults with 2.12
Alessandro Pasotti
apasotti at gmail.com
Wed Oct 28 02:01:04 PDT 2015
2015-10-28 9:57 GMT+01:00 François-Xavier Thomas <
francois-xavier.thomas at airinov.fr>:
> Hello all,
>
> I've just upgraded to QGIS 2.12, in order to test some of my scripts with
> the new version, and they just happen to segfault immediately when I call
> QgsApplication.initQgis() in 2.12.
>
> I've checked the latest docs[1], and the 3 lines mentioned at the
> beginning are enough to crash the Python interpreter:
>
> from qgis.core import *
> QgsApplication.setPrefixPath("/usr", True)
> QgsApplication.initQgis()
>
>
Try to add QtGui.QApplication(sys.argv) such as:
#Initialize QGIS
core.QgsApplication.setPrefixPath("/usr", True)
core.QgsApplication.initQgis()
# On 2.10 crashes without!
QtGui.QApplication(sys.argv)
I thought it was fixed in 2.12 (and master).
--
Alessandro Pasotti
w3: www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151028/e2ce1cde/attachment.html>
More information about the Qgis-user
mailing list