<div dir="ltr">I discovered, that my old Config file was ~ 10MB of size. Each time I was assigning globals, they were appended into the file with their values, instead of being replaced. Is it correct behaviour? <br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><b><font color="#333333">Adam Borczyk</font></b></div><div><font color="#333333"><br></font><div dir="ltr"><div><b>---------------------------------</b></div>
<div><font color="#666666"><b>GIS Support Sp. z o.o.</b></font></div><div><font color="#666666"><a href="https://maps.google.com/?q=Dobrza%C5%84skiego+3,%C2%A0Lublin+20-262&entry=gmail&source=g" target="_blank">Dobrzańskiego 3, </a></font><span style="color:rgb(102,102,102)"><a href="https://maps.google.com/?q=Dobrza%C5%84skiego+3,%C2%A0Lublin+20-262&entry=gmail&source=g" target="_blank">Lublin 20-262</a></span></div><div><span style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">tel. 814511490, </span>NIP: 9462641761,</span><span style="color:rgb(102,102,102)"></span></div>
<div><font color="#666666"><u><a href="http://www.gis-support.pl" target="_blank">www.gis-support.pl</a></u> <br><a href="mailto:info@gis-support.pl" style="text-decoration:underline" target="_blank">info@gis-support.pl</a></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 19 April 2018 at 13:26, Adam Borczyk <span dir="ltr"><<a href="mailto:adam.borczyk@gis-support.pl" target="_blank">adam.borczyk@gis-support.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi everyone,<br><br></div>I recently sent an e-mail here about JSON string variables messing up my globals in QGIS 2.18. Today I experienced another bug (?) - very simple global variable just does not get loaded. The code is:<br><br></div><div>    # Inside SocketIO worker class:<br><br></div><div>    def get_srid(self):<br></div>        # socket request to the server, returning EPSG code as integer<br><div>        self.emit('srid', {}, lambda data: self.assign_srid(data))<br><br>    def assign_srid(self, data):<br>        QgsExpressionContextUtils.<wbr>setGlobalVariable('srid', str(data))<br>        QgsMessageLog.logMessage('<wbr>Assigned SRID: %d' % data , 'myPlugin')<br><br></div><div>The result of calling get_srid() is correct "Assigned SRID: 4326" in Log Messages Panel, but in Properties the variable "SRID" is still empty. Sometimes it works though, after some random number of tries. It also worked after I purged ~/.config/QGIS/QGIS2.conf file, but it'll possibly happen again.<br><br></div><div>Is there anything I have to take special care of? <br></div><div><br></div><div><br><div><div>Best regards<span class="HOEnZb"><font color="#888888"><br clear="all"></font></span></div><span class="HOEnZb"><font color="#888888"><div><div><div class="m_679019598111634480gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><b><font color="#333333">Adam Borczyk</font></b></div></div></div></div></div></div></div></div></div></div></div></div>
</div></font></span></div></div></div>
</blockquote></div><br></div>