<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 4, 2015 at 11:35 PM, Richard Duivenvoorde <span dir="ltr"><<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04-02-15 17:23, Martin Dobias wrote:<br>
<br>
> Looks like QApplication instance was not created, so all places where<br>
> events are needed will fail (e.g. for postgres there is a connection<br>
> pool which releases connections after some time). Something like this<br>
> should be added to the top:<br>
><br>
> import sys<br>
> app = QApplication(sys.argv)<br>
<br>
</span>Hi Martin,<br>
<br>
Thanks for your answer.<br>
<br>
the actual script I was testing was this one (which has this stuff):<br>
<br>
<a href="http://pastebin.com/MWdMzmTW" target="_blank">http://pastebin.com/MWdMzmTW</a></blockquote><div><br></div><div>In that script I still can't see creation of QApplication that I mentioned above. Please note that there are two different things here:</div><div>- QApplication - object that initializes Qt library</div><div>- QgsApplication - has static methods to initialize qgis libraries</div><div><br></div><div>Cheers</div><div>Martin</div><div><br></div></div></div></div>