[Qgis-developer] postgres getFeatures segfault in pyqgis not in console

Martin Dobias wonder.sk at gmail.com
Wed Feb 4 17:48:44 PST 2015


On Wed, Feb 4, 2015 at 11:35 PM, Richard Duivenvoorde <rdmailings at duif.net>
wrote:

> On 04-02-15 17:23, Martin Dobias wrote:
>
> > Looks like QApplication instance was not created, so all places where
> > events are needed will fail (e.g. for postgres there is a connection
> > pool which releases connections after some time). Something like this
> > should be added to the top:
> >
> > import sys
> > app = QApplication(sys.argv)
>
> Hi Martin,
>
> Thanks for your answer.
>
> the actual script I was testing was this one (which has this stuff):
>
> http://pastebin.com/MWdMzmTW


In that script I still can't see creation of QApplication that I mentioned
above. Please note that there are two different things here:
- QApplication - object that initializes Qt library
- QgsApplication - has static methods to initialize qgis libraries

Cheers
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150205/70af75ba/attachment.html>


More information about the Qgis-developer mailing list