<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Note that we also tried the same code with qgis v3.12.0, with the
same result.</p>
<div class="moz-cite-prefix">On 3/11/20 3:05 PM, Trey Stafford
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:afc615c9-9624-1ebd-4da0-49c125338499@nsidc.org">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hello,</p>
<p>We have encountered a problem in attempting to create WMS
layers using PyQGIS (QGIS version 3.10.1 - installed from
conda-forge). <br>
</p>
<p>Attempting to create a QgsRasterLayer with the `wms` provider
results in a segmentation fault.</p>
<p>The following is a reproducible example. Running this code will
cause the segmentation fault. Tested on Ubuntu 18.04.1, python
3.8.2.</p>
<p><br>
</p>
<blockquote>
<pre><font face="Courier New, Courier, monospace">import qgis.core as qgc</font>
<font face="Courier New, Courier, monospace"># Supply path to qgis install location</font></pre>
<pre><font face="Courier New, Courier, monospace">qgc.QgsApplication.setPrefixPath("/path/to/qgis/installation", True)</font>
<font face="Courier New, Courier, monospace">url = <a class="moz-txt-link-rfc2396E" href="http://www.glims.org/mapservice?VERSION=1.3.0&STYLES=" moz-do-not-send="true">"http://www.glims.org/mapservice?VERSION=1.3.0&STYLES="</a></font>
<font face="Courier New, Courier, monospace">print(qgc.QgsRasterLayer(url, 'GLIMS_GLACIERS', 'WMS'))
</font></pre>
</blockquote>
The only output from running the above code is the following
(return code 139):
<blockquote>
<pre><font face="Courier New, Courier, monospace">Segmentation fault (core dumped)</font>
</pre>
</blockquote>
<p>Any advice or suggestions would be appreciated. If no one has
any feedback, we will open a bug report.</p>
<p>Thanks,</p>
Trey Stafford & Matt Fisher<br>
National Snow and Ice Data Center (NSIDC)<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
</body>
</html>