[QGIS-Developer] Creating a WMS layer via PyQGIS triggers segfault

Trey Stafford trey.stafford at nsidc.org
Wed Mar 11 14:20:32 PDT 2020


Note that we also tried the same code with qgis v3.12.0, with the same 
result.

On 3/11/20 3:05 PM, Trey Stafford wrote:
>
> Hello,
>
> We have encountered a problem in attempting to create WMS layers using 
> PyQGIS (QGIS version 3.10.1 - installed from conda-forge).
>
> Attempting to create a QgsRasterLayer with the `wms` provider results 
> in a segmentation fault.
>
> The following is a reproducible example. Running this code will cause 
> the segmentation fault. Tested on Ubuntu 18.04.1, python 3.8.2.
>
>
>     import qgis.core as qgc
>
>     # Supply path to qgis install location
>
>     qgc.QgsApplication.setPrefixPath("/path/to/qgis/installation", True)
>
>     url = "http://www.glims.org/mapservice?VERSION=1.3.0&STYLES="
>
>     print(qgc.QgsRasterLayer(url, 'GLIMS_GLACIERS', 'WMS'))
>
> The only output from running the above code is the following (return 
> code 139):
>
>     Segmentation fault (core dumped)
>
> Any advice or suggestions would be appreciated. If no one has any 
> feedback, we will open a bug report.
>
> Thanks,
>
> Trey Stafford & Matt Fisher
> National Snow and Ice Data Center (NSIDC)
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200311/1de7a16e/attachment.html>


More information about the QGIS-Developer mailing list