Wednesday, 24 August 2016

qgis - QgsMapLayerRegistry().removeMapLayers(wfs_layer) causes crash



I have a WFS layer, served by Geoserver, loaded in QGIS using the standard 'Add WFS layer' dialog. When I try to remove it using:


QgsMapLayerRegistry().instance().removeMapLayer(wfs_layer.id())

I get a full application crash, with no Python errors. This also happens when I use wfs_layer.reload() and wfs_layer.dataProvider().reloadData(). These methods previously worked on the same WFS layer. The service and content of the layer has not changed. The methods work when manipulating a (PostgreSQL) database layer.


I have made no changes to the code that I can see would affect the ability to reload data.


Any ideas or experiences?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...