You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Windows 7 x64 SP1 using Python 2.7 x64, I installed QGIS 2.14.10 from the standalone x64 installer. I was able to run this script successfully in @2.14.9@, but noticed that since I installed @2.14.10@ the script causes a crash in Python.exe
from qgis.core import *
from PyQt4.QtCore import QFileInfo
from PyQt4.QtGui import QApplication
QgsApplication.setPrefixPath(r"C:\\Program Files\\QGIS Essen\\apps\\qgis-ltr", True)
qgs = QApplication([], False)
QgsApplication.initQgis()
1. Get the project instance
project = QgsProject.instance()
1. Open the project
project.read(QFileInfo('C:/path/to/project/project.qgs'))
print project.fileName()
1. Get the layers in the project
layers = QgsMapLayerRegistry.instance().mapLayers()
print layers
QgsApplication.exitQgis()
I've tried with two different project files, both of which open correctly in QGIS
The text was updated successfully, but these errors were encountered:
Author Name: Raphael Dumas (@radumas)
Original Redmine Issue: 16094
Affected QGIS version: 2.14.10
Redmine category:python_plugins
In Windows 7 x64 SP1 using Python 2.7 x64, I installed QGIS 2.14.10 from the standalone x64 installer. I was able to run this script successfully in @2.14.9@, but noticed that since I installed @2.14.10@ the script causes a crash in
Python.exe
Script source: http://gis.stackexchange.com/a/223248/36886
I've tried with two different project files, both of which open correctly in QGIS
The text was updated successfully, but these errors were encountered: